{"uid":"cap_sy11fCpDWCxddJrg1vhr2","slug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-27aaac37","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/repair)","url":"https://onchain-risk.agentdiet.dev/v1/repair?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_NXpNoNn2ihuSktVPURejb","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":"This LLM response came back with broken JSON — it has markdown fences, trailing commas, and single quotes — can you repair it so I can parse it properly: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"The language model returned this JSON with markdown fences and trailing commas and it's breaking my pipeline — can you clean it up so it's valid JSON I can actually use: ```json\n{\"user\": \"bob\", \"score\": 42,}\n```"},{"title":"Recovering truncated structured output","prompt":"My agent got a truncated JSON response that cuts off mid-string — something like {\"title\": \"Report\", \"summary\": \"The quarterly results show — can you repair and complete it into valid JSON so the workflow can continue?"},{"title":"Sanitizing single-quoted JSON from chatbot","prompt":"I'm getting JSON with single quotes instead of double quotes from a chatbot integration, like {'status': 'ok', 'count': 5} — can you convert it to valid JSON so downstream tools can parse it?"}],"resultDescription":"A repaired, valid JSON object with malformed syntax corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for programmatic parsing by downstream agents or pipeline steps.","failureModes":["Input is so severely malformed it cannot be deterministically repaired — returns error indicating unrecoverable JSON","Input is empty or null — returns validation error for missing raw_json field","JSON is ambiguous at truncation point — repair may produce structurally valid but semantically incorrect output","Network or payment (402) failure preventing endpoint access"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common formatting issues like trailing commas, markdown code fences, or single quotes — particularly when you need deterministic, rule-based repair rather than probabilistic LLM re-generation. Ideal for high-throughput agent workflows where reliability and consistency matter more than creative reconstruction of heavily corrupted data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:38:31.837Z","isFirstParty":false,"canonicalSlug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0"}