{"uid":"cap_x8YHqcm7E49vwmzxwuk95","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-5b6d2501","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/v1/repair)","url":"https://json-repair.agentdiet.dev/v1/repair?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_Tdzxy-X8B06qnf69MTT5B","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) into valid, parseable JSON so multi-agent pipelines never crash.","exampleAgentPrompt":"This LLM response 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 output before pipeline handoff","prompt":"The previous agent returned malformed JSON with a trailing comma and it's breaking my pipeline — can you repair this string so it's valid JSON I can parse: '{\"items\": [\"apple\", \"banana\",], \"count\": 2}'?"},{"title":"Strip markdown fences from chat response","prompt":"My LLM wrapped its JSON response in triple-backtick markdown fences and now it won't parse — clean it up for me: ```json\n{\"result\": \"success\", \"data\": [1, 2, 3]}\n```"},{"title":"Recover truncated JSON from a crashed agent","prompt":"My agent got cut off mid-response and the JSON is truncated — it ends with '{\"user\": \"bob\", \"score\": 42, \"tags\": [\"vip\"' — can you repair it into valid parseable JSON?"}],"resultDescription":"A valid, repaired JSON object with the malformed input cleaned up: trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed. The response schema is a generic JSON object containing the repaired output.","failureModes":["Input string is so malformed it cannot be deterministically repaired, returning an error or best-effort partial result","Empty or null raw_json input triggers a validation error","Payment failure via x402 prevents the request from being processed","Extremely long or deeply nested malformed JSON may time out or return incomplete repairs"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails JSON.parse due to common issues like trailing commas, markdown code fences, single quotes, or truncation. It is purpose-built for agentic workflows where LLM outputs must be reliably parsed before being handed off to the next stage. Prefer it over writing custom regex fixes or retry loops for malformed JSON.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:50.752Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}