{"uid":"cap_Tk5O-IMLDdv_CvwCym5g6","slug":"agent402-json-schema-validator-c9bd1502","name":"Agent402 JSON Schema Validator","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/validate/json-schema","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"schema":{"type":"object","description":"JSON Schema subset"},"instance":{"type":"object","description":"Value to validate"}}},"responseSchema":{"type":"json","example":{"valid":true,"errors":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_epZ0Jo6Zv4sLpfCGJ8eEy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a JSON instance against a JSON Schema (type, required, properties, enum, min/max) and returns a deterministic pass/fail result with errors","exampleAgentPrompt":"Before you send that tool call result downstream, validate it against this JSON Schema — schema requires 'name' (string), 'age' (integer, min 0), and 'status' (enum: active/inactive) — and tell me if the instance passes or what errors it found.","exampleUseCases":[{"title":"Guard LLM output before database write","prompt":"I need you to validate this JSON object my LLM just generated against the schema before we write it to the database — schema requires 'userId' (string, required), 'amount' (number, min 0, max 10000), and 'currency' (enum: USD, GBP, EUR). Here's the instance: {\"userId\": \"abc123\", \"amount\": -50, \"currency\": \"USD\"}."},{"title":"Verify agent tool output structure","prompt":"The agent tool returned this JSON — can you check it against the required schema (must have 'action' as a string, 'payload' as an object, and 'timestamp' as a string, all required) and tell me exactly which fields are missing or wrong?"},{"title":"Catch enum violations in structured output","prompt":"My LLM produced this JSON for a booking request and I want to catch any schema errors before it triggers a payment — schema says 'status' must be one of pending/confirmed/cancelled and 'seats' must be an integer between 1 and 10. Validate this instance: {\"status\": \"approved\", \"seats\": 0}."}],"resultDescription":"Returns a JSON object with a boolean 'valid' field (true/false) and an 'errors' array listing any schema violations with details about which constraint failed (type mismatch, missing required field, enum violation, min/max breach, etc.). On success with no errors, 'errors' is an empty array.","failureModes":["Malformed JSON schema object causes 400-level error","Instance or schema field missing from request body returns error","Schema features outside the deterministic subset (e.g. $ref, allOf, oneOf) may not be supported","Network or payment (x402) failure returns no validation result","Very deeply nested schemas may exceed processing limits"],"whenToPreferThis":"Choose this endpoint when you need fast, deterministic, server-side JSON Schema validation — particularly to catch LLM structured-output errors before they trigger irreversible side effects like payments or database writes. Prefer it over rolling your own validation logic when your agent is already calling micro-APIs and you want a cheap ($0.001), stateless, no-key-required validation step in a pipeline. Best for the core subset of JSON Schema (type, required, properties, enum, min/max). If you need full JSON Schema draft support including $ref or complex combiners, consider a dedicated validation library instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T15:26:16.708Z","isFirstParty":false}