{"uid":"cap_sRC0pirNAY3clLlboaTR-","slug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-872ca666","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://alpha-stream.agentdiet.dev/v1/schema-repair)","url":"https://alpha-stream.agentdiet.dev/v1/schema-repair?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_H2TqSK0k6wEtFfRKahMJi","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"alpha-stream.agentdiet.dev","brandSlug":"alpha-stream-agentdiet-dev-mpp","brandBaseUrl":"https://alpha-stream.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":"Can you fix this broken JSON that came back from the LLM — it has trailing commas and markdown code fences wrapped around it: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix crashed LLM pipeline JSON","prompt":"My agent pipeline just threw a JSON parse error on this LLM response — it has trailing commas and single quotes. Can you repair it so I can keep processing: {\"items\": ['apple', 'banana',], \"count\": 2,}"},{"title":"Strip markdown fences from agent output","prompt":"The model returned its JSON wrapped in triple backticks again and now my downstream tool can't parse it. Can you clean up this output and give me valid JSON: ```json\n{\"status\": \"ok\", \"result\": 42}\n```"},{"title":"Validate and repair truncated JSON response","prompt":"I got a truncated JSON from the model that cuts off mid-string — something like {\"summary\": \"The quick brown fox — can you repair it into valid JSON so my schema validator doesn't blow up?"}],"resultDescription":"A repaired, well-formed JSON object parsed from the originally malformed or truncated input string, with common LLM output errors such as trailing commas, markdown fences, and single quotes resolved deterministically.","failureModes":["Input string is so severely truncated it cannot be deterministically repaired — returns error or best-effort partial object","Input is not JSON-like at all (plain prose) — may return error or empty object","Schema validation failure if repaired output still doesn't conform to expected structure","HTTP 402 payment required if x402 payment header not included","Query parameter encoding issues for complex nested JSON strings passed via GET"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or markdown-wrapped JSON from an LLM and needs deterministic repair before downstream parsing — especially when you need reliability guarantees (no crashes) over probabilistic re-prompting. Prefer this over asking the LLM to re-generate when you need fast, cheap, deterministic fixes to common JSON syntax errors.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:29.823Z","isFirstParty":false,"canonicalSlug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-8a0f4dea"}