{"uid":"cap_FNULHwSwL-bBmBOT2ZLGV","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-a963c10e","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/structured-output)","url":"https://github-audit.agentdiet.dev/v1/structured-output?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_G5Cb0uLSfxUW-7iuI9Va9","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) to prevent multi-agent pipeline crashes","exampleAgentPrompt":"The JSON I got back from the LLM is broken — it has trailing commas and markdown code fences wrapping it. Can you clean it up and give me valid JSON? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM output before next pipeline step","prompt":"The model just returned this JSON with a trailing comma and backtick fences and my pipeline is crashing — can you repair it so I can pass it to the next agent? Here's the raw output: ```json {\"status\": \"ok\", \"score\": 0.95,} ```"},{"title":"Repair single-quoted JSON from agent response","prompt":"I got this JSON back from an agent but it uses single quotes instead of double quotes and my parser is rejecting it — fix it for me: {'user': 'bob', 'active': true}"},{"title":"Recover truncated structured output","prompt":"My LLM response got cut off mid-JSON and now it's malformed — something like {\"items\": [{\"id\": 1, \"name\": \"foo\" — can you deterministically repair and close it so it's valid JSON I can use?"}],"resultDescription":"Returns a repaired, valid JSON object parsed from the malformed input, with common issues like trailing commas, markdown code fences, single quotes, and truncation corrected deterministically.","failureModes":["Input JSON is too severely corrupted to recover — returns error indicating repair not possible","Input string is empty or missing the raw_json parameter — returns 400 validation error","JSON is structurally ambiguous (e.g. multiple valid repairs possible) — may return best-effort result or error","Network timeout or service unavailability — returns 5xx error"],"whenToPreferThis":"Use this endpoint when you have LLM or agent-generated JSON that is syntactically broken and need a deterministic (non-AI) fix before passing it downstream in a pipeline. Prefer it over prompt-based JSON repair when you need speed, consistency, and no hallucination risk. Ideal for multi-agent architectures where structured outputs from one model feed into another component that requires strict JSON compliance.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:34.149Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}