{"uid":"cap_zjoq0hjPl46fCEqQABmks","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-349082af","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/json-repair)","url":"https://github-audit.agentdiet.dev/v1/json-repair?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_9StF5lCkih5dvTJ0L9Mvd","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, truncation) so multi-agent pipelines can proceed without crashing.","exampleAgentPrompt":"The LLM just returned this broken JSON with trailing commas and markdown fences — can you repair it so the next step in the pipeline doesn't crash: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fix crashed multi-agent pipeline JSON","prompt":"My agent pipeline keeps crashing because the upstream LLM returned this malformed JSON — can you repair it so I can pass it downstream: `{name: 'Bob', scores: [10, 20, 30,]}`?"},{"title":"Strip markdown fences from LLM output","prompt":"The model wrapped its JSON response in triple backticks and added a trailing comma — please clean this up so it's valid JSON I can actually parse: ```json\n{\"status\": \"ok\", \"count\": 5,}\n```."},{"title":"Recover truncated LLM JSON response","prompt":"My LLM response got cut off mid-generation and the JSON is truncated — can you deterministically repair this so it's valid: `{\"results\": [{\"id\": 1, \"value\": \"hello\"}, {\"id\": 2`?"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input. The response contains the corrected JSON with syntax errors fixed, markdown fences stripped, trailing commas removed, single quotes normalized, and truncated structures closed — ready for immediate use in downstream agent steps.","failureModes":["Input is so corrupted that deterministic repair is impossible — returns error","Empty or whitespace-only raw_json input rejected with validation error","Input exceeds maximum allowed length","Non-JSON content (e.g. plain text, HTML) provided instead of JSON-like string"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that is syntactically invalid and must be repaired before downstream processing. Ideal when you need deterministic, reproducible repairs (not heuristic LLM re-generation) for trailing commas, markdown fences, single quotes, or truncated structures. Prefer this over asking an LLM to re-generate the JSON when you need consistency, speed, and cost predictability at $0.002/call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:37:13.811Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}