{"uid":"cap_8izMU1usUSdzWPn0VZPIm","slug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-21cc37a1","name":"Deterministic A2A Broken-JSON Repair & Schema Validator","description":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://onchain-risk.agentdiet.dev/v1/json-validator)","url":"https://onchain-risk.agentdiet.dev/v1/json-validator?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"raw_json":{"type":"string","minLength":1,"description":"Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.002","displayCostAsset":"USD","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":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_z0Wr0xwQRmzMPReB2Izfn","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"onchain-risk.agentdiet.dev","brandSlug":"onchain-risk-agentdiet-dev-mpp","brandBaseUrl":"https://onchain-risk.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Deterministically repairs malformed, truncated, or LLM-generated JSON (trailing commas, markdown fences, single quotes) so agent pipelines never crash on bad JSON.","exampleAgentPrompt":"This LLM output has trailing commas and markdown code fences wrapping the JSON — can you run it through the JSON repair service to fix it so I can use it in the next step of my pipeline?","exampleUseCases":[{"title":"Fix LLM output for agent pipeline","prompt":"The model just returned JSON wrapped in triple-backtick markdown fences with a trailing comma — can you repair it so I can pass it cleanly to the next agent in the workflow?"},{"title":"Repair truncated JSON from streaming response","prompt":"My streaming LLM response got cut off mid-JSON and now it's broken — can you fix the truncated JSON so the parser doesn't crash?"},{"title":"Sanitize single-quoted JSON from AI tool call","prompt":"This tool response came back with single quotes instead of double quotes and some unescaped characters — can you clean it up into valid JSON?"}],"resultDescription":"Returns a repaired, valid JSON object reconstructed from the malformed input string. The response includes the corrected JSON, suitable for direct use in downstream agent steps or pipeline stages without further sanitization.","failureModes":["Input JSON too severely truncated to reconstruct — returns error indicating unrecoverable structure","Empty or whitespace-only raw_json input rejected with validation error","Ambiguous JSON that could be repaired in multiple ways may produce unexpected but syntactically valid output","Network or payment (x402) failure may prevent the request from completing"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated or tool-call JSON that is syntactically broken — especially with trailing commas, markdown code fences, single quotes, or truncation. Prefer it over ad-hoc regex fixes when you need deterministic, reproducible repair that won't vary between runs. Ideal for hardening agent pipelines that ingest unpredictable LLM output before passing to downstream parsers or validators.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:37:44.518Z","isFirstParty":false,"canonicalSlug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0"}