{"uid":"cap_1GQLdaP83P_IljiFcU5Fu","slug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-c80c84b0","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/llm-json-schema-healer)","url":"https://onchain-risk.agentdiet.dev/v1/llm-json-schema-healer?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_ru9aV_9ZC6v1WcToWaE7p","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":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.","exampleAgentPrompt":"I just got back a response from another LLM that looks like broken JSON — it has trailing commas, markdown code fences, and single quotes instead of double quotes. Can you run it through the JSON healer to get a clean, valid object back?","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"The model upstream just returned a JSON blob with trailing commas and it's wrapped in a markdown code block — can you repair it so our pipeline doesn't crash? Here's the raw string: ```{name: 'Alice', age: 30,}```"},{"title":"Recovering truncated JSON from AI response","prompt":"Our AI response got cut off mid-JSON and now it's invalid — something like {\"items\":[{\"id\":1,\"value\":\"foo\". Can you fix and complete it so we can parse it normally?"},{"title":"Sanitizing single-quoted JSON before storage","prompt":"I have a JSON string that uses single quotes everywhere instead of double quotes, like {'key': 'value', 'count': 5}. Can you convert it to valid JSON so we can store it without errors?"}],"resultDescription":"A repaired, valid JSON object parsed from the malformed input string, with all syntax errors corrected including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error indicating unrecoverable JSON","Empty or whitespace-only raw_json input — returns validation error","Input that is not JSON at all (e.g. plain prose) — may return error or best-effort partial object","Payment failure via x402 — returns HTTP 402 before processing"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails standard JSON.parse() due to LLM quirks like trailing commas, markdown fences, or single quotes, and you need a deterministic (non-AI) repair rather than asking another LLM to fix it. Ideal for production pipelines where reliability and predictability matter over creative reconstruction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:34:45.434Z","isFirstParty":false,"canonicalSlug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0"}