{"uid":"cap_Acg-ZzKqP79o2WyuiuIDo","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ef51894f","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/schema-repair)","url":"https://json-repair.agentdiet.dev/v1/schema-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_bUYoLfBFAeOWQVHSXz8T9","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 malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, markdown fences) into valid JSON for use in multi-agent pipelines","exampleAgentPrompt":"This LLM output came back with markdown fences and trailing commas and it's crashing my pipeline — can you repair it into valid JSON: ```{\"name\": \"Alice\", \"score\": 42,}```?","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My language model just returned this malformed JSON with trailing commas and it's breaking my downstream tool — can you fix it into valid JSON: {\"status\": \"ok\", \"items\": [\"a\", \"b\",]}?"},{"title":"Stripping markdown fences from JSON","prompt":"The model wrapped its JSON in triple backticks again and my parser is choking on it — please repair this into clean, parseable JSON: ```json\n{\"user\": \"bob\", 'role': 'admin'}\n```"},{"title":"Recovering truncated JSON response","prompt":"My agent's JSON response got cut off mid-structure and now it's invalid — can you deterministically repair this truncated JSON so I can extract the data: {\"results\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2, \"name\":?"}],"resultDescription":"A repaired, valid JSON object derived from the malformed input string, with syntax errors corrected — trailing commas removed, single quotes converted to double quotes, markdown fences stripped, and truncated structures closed — ready for downstream parsing and processing.","failureModes":["Input is so severely malformed that deterministic repair is ambiguous or impossible, returning an error","Input string is empty (violates minLength:1 constraint)","JSON is semantically invalid in ways that cannot be inferred (e.g. missing required values with no context)","Payment not processed (x402 402 response) if USDC micropayment fails","Timeout if input is extremely large"],"whenToPreferThis":"Choose this endpoint when a multi-agent pipeline receives malformed, truncated, or markdown-wrapped JSON from an LLM and needs a fast, deterministic (non-AI) repair before downstream processing. Ideal when you need reliable, rule-based fixes (trailing commas, single quotes, fences) rather than probabilistic regeneration. Prefer over prompt-retrying the LLM when latency and cost matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:36.017Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}