{"uid":"cap_ylVLrx0hNlzhDbDfRIPxs","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-d0fe34a4","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/schema-repair)","url":"https://github-audit.agentdiet.dev/v1/schema-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_QwqJdZmdydPnVlwkSEPmE","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) into valid JSON so multi-agent pipelines don't crash","exampleAgentPrompt":"This JSON output from my LLM has trailing commas and markdown code fences and it's breaking my pipeline — can you repair it and give me back valid, clean JSON? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"The language model in my pipeline just returned JSON wrapped in triple backticks with a trailing comma and it's causing my next agent to crash — can you clean it up and return valid JSON? Raw output: ```{\"status\": \"ok\", \"items\": [1, 2, 3,]}```"},{"title":"Repair truncated JSON mid-string","prompt":"My streaming LLM got cut off mid-response and the JSON is incomplete — it ends abruptly with no closing braces. Can you repair this truncated JSON and fill in what's missing to make it valid? Here's the broken string: {\"user\": \"bob\", \"score\": 42"},{"title":"Sanitize single-quoted JSON from agent output","prompt":"One of my agents is outputting JSON using single quotes instead of double quotes which means nothing downstream can parse it. Can you fix this malformed JSON and return a proper double-quoted valid version? Here's what I got: {'product': 'widget', 'price': 9.99}"}],"resultDescription":"A JSON object containing the repaired, valid JSON output derived from the malformed input string. The response allows downstream agents and pipelines to safely parse and consume the corrected data without errors.","failureModes":["Input is so severely malformed that deterministic repair is impossible — may return error or best-effort partial output","Extremely long truncated JSON may exceed token or size limits","Ambiguous structure where multiple valid repairs are possible may produce unexpected results","Non-JSON input (e.g. plain text or binary) will fail to repair meaningfully"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that is syntactically broken — trailing commas, markdown code fences, single quotes, or truncation — and you need a deterministic, cheap fix ($0.002/call) rather than re-prompting the LLM. Prefer it over re-generation when latency and cost matter and the structure of the intended JSON is still recoverable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:36:28.003Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}