{"uid":"cap_NVYVss80fOvmBL0yxyB9h","slug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-9210320d","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/json-normalizer)","url":"https://mcp-compiler.agentdiet.dev/v1/json-normalizer?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_RSlKCR-PUwZmHQqeN1o2k","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) into valid JSON so multi-agent pipelines never crash.","exampleAgentPrompt":"This LLM output came back with a trailing comma and markdown fences and it's breaking my pipeline — can you clean it up and give me valid JSON? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fixing LLM JSON in agent pipeline","prompt":"My language model just returned some JSON with single quotes and a trailing comma and it's crashing my downstream agent — can you repair this string and give me back valid JSON? Here it is: {'name': 'Bob', 'score': 42,}"},{"title":"Stripping markdown fences from AI output","prompt":"The AI wrapped its JSON response in triple backtick markdown fences and my parser is choking on it — can you strip the fences and fix any other issues so I get clean, parseable JSON back?"},{"title":"Recovering truncated JSON from a timeout","prompt":"My agent timed out mid-response and the JSON got cut off partway through — can you repair this truncated JSON string so I can extract whatever data was captured: {\"items\": [{\"id\": 1, \"value\": \"foo\"}, {\"id\": 2"}],"resultDescription":"Returns a repaired, valid JSON object with the malformed input normalized — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — so the output can be safely parsed by any standard JSON parser.","failureModes":["Input is so severely malformed that deterministic repair is impossible and no valid JSON can be inferred","Input is not JSON at all (e.g. plain text or binary data) causing repair to fail","Truncation is too severe to recover meaningful structure","Payment not provided or invalid causing HTTP 402 response","Empty or missing raw_json parameter causing validation error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based reformatting — ideal for multi-agent pipelines where reproducibility matters, when fixing common LLM output artifacts (trailing commas, markdown fences, single quotes), and when you need fast, cheap per-call repair without probabilistic variation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:38.316Z","isFirstParty":false,"canonicalSlug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-987bc021"}