{"uid":"cap_exn1HF1-fkso66WDLKdWN","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-77956dd3","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":"POST","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_tCb0Bz5MoQI6n-OAjf65G","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-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash on bad output.","exampleAgentPrompt":"This JSON string came back from a language model and has trailing commas, single quotes, and a markdown code fence wrapping it — can you fix it so it parses cleanly: ```{'name': 'Alice', 'age': 30,}```?","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"The last node in my agent pipeline returned this broken JSON with trailing commas and single quotes — clean it up so the next step doesn't crash: {'items': ['a', 'b',], 'count': 2,}"},{"title":"Stripping markdown fences from model response","prompt":"My language model keeps wrapping its JSON in triple-backtick code fences and I can't parse it downstream — can you strip those and return a clean, valid JSON object from this: ```json\n{\"status\": \"ok\",}\n```"},{"title":"Repairing truncated JSON from streaming output","prompt":"I got a truncated JSON response from a streaming LLM call that got cut off mid-object — here it is: {\"name\": \"report\", \"sections\": [\"intro\", \"body\" — can you repair it into valid JSON?"}],"resultDescription":"A repaired, valid JSON object that has been corrected for common LLM output errors including trailing commas, single-quoted keys/values, markdown code fences, and truncation. The response is returned as a JSON object containing the healed structure, ready to be passed downstream in a multi-agent pipeline.","failureModes":["Input JSON is so severely corrupted that deterministic repair is impossible — returns an error indicating repair failed","Input string is empty or below minimum length — validation error returned","Ambiguous truncation with multiple valid completions — may return best-guess repair or error","Non-JSON input that cannot be interpreted as JSON even with repair — returns parse failure"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline or LLM orchestration layer receives JSON output that fails standard JSON.parse() due to common LLM formatting mistakes (trailing commas, single quotes, markdown fences, truncation). It is especially valuable in automated A2A workflows where a crashed parse step would halt the entire pipeline. Prefer it over custom regex-based sanitization when you need deterministic, reliable repair without writing and maintaining your own logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:46:20.623Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}