{"uid":"cap_qQevHy6b6B5jo1EX3Un4l","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-66109211","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://json-repair.agentdiet.dev/api)","url":"https://json-repair.agentdiet.dev/api?utm_source=zero.xyz","method":"GET","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_BD2NlDx8FJKJqcVRCv3Yu","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"json-repair.agentdiet.dev","brandSlug":"json-repair-agentdiet-dev-mpp","brandBaseUrl":"https://json-repair.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 output came back as broken JSON with trailing commas and markdown fences — can you repair it so I can parse it? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30, }```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My AI pipeline keeps crashing because the model is returning JSON with trailing commas and single-quoted keys. Can you repair this raw output so it's valid JSON I can actually parse? Here it is: {'items': ['apple', 'banana',], 'count': 2,}"},{"title":"Strip markdown fences from agent output","prompt":"The coding agent returned its response wrapped in triple-backtick markdown fences and the JSON inside has some syntax errors. Clean it up and give me the valid JSON object."},{"title":"Recover truncated JSON from context cutoff","prompt":"My model hit the context limit mid-response and the JSON got cut off — it's missing closing brackets and has some bad commas. Can you deterministically repair this truncated JSON so I can extract the data?"}],"resultDescription":"A repaired, syntactically valid JSON object that has been cleaned of common LLM-introduced errors such as trailing commas, markdown fences, single-quoted strings, and truncation artifacts, ready for programmatic parsing.","failureModes":["Input is not recoverable JSON (completely unstructured text) — returns an error or best-effort partial result","Extremely long or deeply nested JSON may hit query parameter length limits via GET","Ambiguous repair cases where multiple valid interpretations exist may produce unexpected structure","Empty or whitespace-only raw_json input rejected due to minLength:1 constraint"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in a multi-agent or automated pipeline — especially when you need reliability guarantees (no hallucination in repair logic) and are dealing with common LLM artifacts like trailing commas, markdown code fences, or single-quoted keys. Prefer it over manual parsing or regex hacks when your pipeline must never crash on bad JSON.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:59.773Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}