{"uid":"cap_mAb91FoXUBM6eIVBUp34J","slug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-b36a3126","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/malformed-json-healer)","url":"https://mcp-compiler.agentdiet.dev/v1/malformed-json-healer?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_gZgsgnuv2LO6oZsoVTe7S","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 truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes, truncation) into valid JSON for use in multi-agent pipelines.","exampleAgentPrompt":"This JSON from my LLM just crashed my pipeline — can you fix it? It has trailing commas and markdown fences wrapping it: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix crashed agent pipeline JSON","prompt":"My multi-agent pipeline just threw an error because the LLM returned malformed JSON with a trailing comma and a missing closing brace — can you repair this and give me back valid JSON: {\"status\": \"ok\", \"items\": [\"a\", \"b\",}"},{"title":"Strip markdown fences from LLM output","prompt":"The model returned its JSON wrapped in triple-backtick markdown code fences and now my parser is failing — please clean this up and return just the raw valid JSON: ```json\n{\"user\": \"bob\", \"score\": 42}\n```"},{"title":"Recover single-quoted JSON for downstream tool","prompt":"I got this JSON back from a prompt chain that used single quotes instead of double quotes and it won't parse — can you fix it so I can pass it to the next step? {'city': 'New York', 'temp': 72}"}],"resultDescription":"Returns a JSON object containing the repaired, valid JSON output — ready to be parsed and passed downstream in an agent pipeline without syntax errors.","failureModes":["JSON is too severely truncated or corrupted to deterministically recover — returns error or best-effort partial result","Input is not JSON-like at all (plain text, binary) — repair may fail or return unexpected output","Ambiguous structure where multiple valid repairs are possible — repair picks one deterministically but may not match original intent","Network or payment (x402) failure — call does not complete"],"whenToPreferThis":"Choose this endpoint when an AI agent or LLM pipeline receives JSON output that fails to parse and you need a deterministic, reliable fix rather than a probabilistic re-prompt. Ideal for production multi-agent workflows where retrying the LLM is expensive or unreliable, and you need a fast, cheap ($0.002/call) programmatic repair step.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:51:23.022Z","isFirstParty":false,"canonicalSlug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-987bc021"}