{"uid":"cap_HwfJTz8fJ73csrjSQul2v","slug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-987bc021","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://mcp-compiler.agentdiet.dev/v1/repair)","url":"https://mcp-compiler.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_hghxoW-eriKpta3vZqWVw","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"mcp-compiler.agentdiet.dev","brandSlug":"mcp-compiler-agentdiet-dev-mpp","brandBaseUrl":"https://mcp-compiler.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, fence blocks) so agent pipelines can safely parse them","exampleAgentPrompt":"The LLM just returned this JSON with trailing commas and markdown fences and it's crashing my parser — can you clean it up and give me valid JSON back: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"Fixing crashed multi-agent pipeline","prompt":"My downstream agent is crashing because the upstream LLM returned JSON with trailing commas and a missing closing bracket — can you repair this so I can continue: {\"user\": \"bob\", \"items\": [1, 2, 3,}"},{"title":"Stripping markdown fences from LLM output","prompt":"The model wrapped its JSON response in triple-backtick markdown fences and my JSON parser is choking on it — please strip the fences and fix any syntax issues: ```json\n{\"status\": 'ok', \"count\": 5}\n```"},{"title":"Recovering truncated LLM JSON response","prompt":"The LLM hit its token limit mid-response and I got a truncated JSON object that ends abruptly — can you deterministically repair it so I can extract usable data: {\"results\": [{\"id\": 1, \"title\": \"Report\""}],"resultDescription":"A repaired, valid JSON object that has had common LLM-generated syntax errors corrected, including removal of markdown fences, fixing trailing commas, converting single quotes to double quotes, and closing truncated structures — ready to be deserialized by any standard JSON parser.","failureModes":["Input JSON is so severely malformed or incomplete that deterministic repair is impossible","Input is not JSON at all (e.g. plain prose), causing repair to fail or produce garbage output","Ambiguous truncation points where multiple valid completions exist, potentially producing incorrect structure","Very large JSON strings may hit query parameter length limits since raw_json is passed as a query parameter","Payment failure (HTTP 402) if x402 USDC payment is not properly attached"],"whenToPreferThis":"Choose this endpoint when your agent pipeline receives JSON from an LLM that frequently produces syntax errors such as trailing commas, markdown-wrapped output, single-quoted strings, or truncated responses, and you need a deterministic (not probabilistic) fix before passing data downstream. Ideal for hardening multi-agent pipelines against parse failures without adding another LLM call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:07.818Z","isFirstParty":false,"canonicalSlug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-987bc021"}