{"uid":"cap_6rdyElAdfOb2ms2jYEVq_","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-95c4e47f","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/llm-json-schema-healer)","url":"https://github-audit.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_Wz7Sq0suoZlL-oe4Nd-zw","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":"This JSON came back from an LLM with trailing commas and markdown code fences and it's breaking my pipeline — can you repair it and give me clean, valid JSON: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"Fix LLM output crashing pipeline","prompt":"My agent just returned this malformed JSON with trailing commas and it's crashing the next step — can you repair it? Here it is: {\"user\": \"bob\", \"items\": [1, 2, 3,], \"active\": true,}"},{"title":"Strip markdown fences from AI response","prompt":"The model wrapped its JSON output in triple backtick markdown fences and my parser is choking on it — please clean it up and return valid JSON: ```json\n{\"status\": \"ok\", \"data\": {\"id\": 99}}\n```"},{"title":"Rescue truncated JSON from token limit","prompt":"This JSON got cut off mid-string because the LLM hit its token limit and now it's invalid — can you deterministically repair and complete it so I can process it? Here's what I got: {\"results\": [{\"name\": \"alpha\", \"value\": 10}, {\"name\": \"beta\""}],"resultDescription":"A repaired, schema-valid JSON object reconstructed from the malformed input, with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures completed — ready for direct use in downstream agent pipelines.","failureModes":["Input is so severely truncated that deterministic repair is ambiguous — returns best-effort or error","Input contains non-JSON content entirely (e.g. plain prose) — may return parse error","Extremely nested or large JSON may hit size limits","Malformed input with conflicting structures may produce unexpected repair results"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsers due to common LLM quirks like trailing commas, markdown code fences, single quotes, or truncation. Ideal for agent orchestration layers that must robustly handle unpredictable LLM outputs without crashing. Prefer this over manual regex heuristics or writing your own repair logic when you need a deterministic, paid-per-call microservice that integrates with x402 payment flows and MCP toolchains.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:08.403Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}