{"uid":"cap_4K8XbrNtxA1y5U0JHFU55","slug":"agentdiet-dev-deterministic-a2a-broken-json-repair-schema-validator-3d9711c7","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://agentdiet.dev/v1/llm-json-schema-healer)","url":"https://agentdiet.dev/v1/llm-json-schema-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_86oMXUoGlK0yKeVq8ysM8","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agentdiet.dev","brandSlug":"agentdiet-dev-mpp","brandBaseUrl":"https://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":"The LLM just returned this broken JSON with trailing commas and markdown fences — can you repair it so it parses correctly: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fixing LLM output before downstream agent","prompt":"My orchestrator agent got this malformed JSON back from a sub-agent and the pipeline crashed — can you fix it so I can pass it along: `{'user': 'bob', 'score': 42,}`?"},{"title":"Stripping markdown fences from model response","prompt":"The model wrapped its JSON in triple backticks and now my parser is failing — clean this up for me: ```json\n{\"result\": \"ok\", \"count\": 5}\n```"},{"title":"Recovering truncated JSON from token limit cutoff","prompt":"The LLM hit its token limit mid-response and the JSON got cut off — here's what I have: `{\"items\": [{\"id\": 1, \"name\": \"foo\"` — can you repair it into something valid?"}],"resultDescription":"A JSON object containing the deterministically repaired, syntactically valid version of the input malformed JSON string, ready for downstream parsing without throwing errors","failureModes":["Input JSON is so severely malformed that deterministic repair is impossible, returning an error","Input string is empty or missing the raw_json parameter (validation error)","JSON structure is ambiguous after repair, producing a best-guess output that may not match original intent","Very large or deeply nested broken JSON may time out or return partial repair"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails JSON.parse() due to common LLM output artifacts like trailing commas, markdown code fences, single quotes instead of double quotes, or truncation from token limits. Prefer this over manual regex cleaning or LLM re-prompting when you need deterministic, fast, cheap repair ($0.002/call) without model inference overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:45:44.752Z","isFirstParty":false,"canonicalSlug":"agentdiet-dev-deterministic-a2a-broken-json-repair-schema-validator-dd9f7439"}