{"uid":"cap_mCdic2IbKQXVJ46IE-A-s","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-e57f9519","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://github-audit.agentdiet.dev/v1/malformed-json-healer)","url":"https://github-audit.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_z91m9G4C08GrNyq49kR2K","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"github-audit.agentdiet.dev","brandSlug":"github-audit-agentdiet-dev-mpp","brandBaseUrl":"https://github-audit.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.","exampleAgentPrompt":"My LLM just returned this broken JSON with trailing commas and markdown fences — can you repair it so I can pass it to the next step in my pipeline? Here's the raw output: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before pipeline step","prompt":"The language model returned this JSON but it has trailing commas and single quotes — please repair it deterministically so the next agent in my workflow doesn't crash: {'user': 'bob', 'score': 42,}"},{"title":"Strip markdown fences from agent response","prompt":"My agent wrapped its JSON in markdown code fences and now my parser is failing — can you clean up this output and give me valid JSON? Here's what came back: ```json\n{\"status\": \"ok\", \"count\": 5}\n```"},{"title":"Recover truncated JSON from LLM","prompt":"The model got cut off mid-response and I got this incomplete JSON — can you repair and complete it so it's valid? Here it is: {\"items\": [{\"id\": 1, \"name\": \"widget\""}],"resultDescription":"A JSON object containing the repaired, syntactically valid JSON — with all common LLM-induced defects (trailing commas, markdown fences, single quotes, truncated structures) deterministically fixed and ready to use in downstream pipeline steps.","failureModes":["Input JSON is so severely malformed it cannot be deterministically repaired — returns error or partial result","Ambiguous truncation point where the intended structure cannot be inferred — may return best-guess repair","Empty or whitespace-only input — returns validation error","Input exceeds maximum length limits — returns truncation or rejection error","Network timeout or service unavailability — returns HTTP 5xx"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline needs a deterministic, rule-based JSON repair step rather than a probabilistic LLM re-parse. Ideal when you need reproducible, auditable fixes for known LLM output defects like trailing commas, markdown fences, and single quotes, and when you cannot afford to re-prompt the LLM due to cost or latency constraints.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:43:18.246Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}