{"uid":"cap_PkkGr2tmpn75s_bmgth-I","slug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-e41d6f6e","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/malformed-json-healer)","url":"https://alpha-stream.agentdiet.dev/v1/malformed-json-healer?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_ZSB0MUSVVeHG1LRng92ZV","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":"This JSON string from my LLM is broken — it has trailing commas, markdown fences, and single quotes — can you repair it into valid JSON? Here it is: ```{name: 'Alice', age: 30,}```","exampleUseCases":[{"title":"Fix crashed multi-agent pipeline JSON","prompt":"My agent pipeline just crashed because one of the LLM nodes returned malformed JSON with trailing commas and markdown code fences. Can you repair this so the next step can parse it? The broken output is: ```json\n{\"user\": \"bob\", \"score\": 42,}\n```"},{"title":"Clean single-quoted LLM JSON output","prompt":"The model returned JSON using single quotes instead of double quotes and it's breaking my parser. Can you fix this string into valid JSON: {'name': 'Carol', 'active': True}"},{"title":"Recover truncated JSON from failed LLM call","prompt":"My LLM call got cut off mid-response and the JSON is truncated — it ends abruptly without closing braces. Can you repair it into something parseable? Here's what I got: {\"items\": [{\"id\": 1, \"title\": \"Report\"}, {\"id\": 2"}],"resultDescription":"A JSON object containing the repaired, valid JSON structure derived from the malformed input. The response should be parseable and schema-compliant after correction of issues like trailing commas, markdown fences, single quotes, and truncation artifacts.","failureModes":["Input JSON is so severely truncated that repair is ambiguous or impossible","Malformation is beyond deterministic repair heuristics (e.g. completely scrambled structure)","Empty or whitespace-only raw_json input","Input exceeds size limits","Payment not processed (HTTP 402) if x402 credentials are missing or invalid"],"whenToPreferThis":"Use this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common issues like trailing commas, markdown code fences, single quotes, or truncation. Prefer this over manual regex fixes or custom parsers when you need a deterministic, hosted repair service that integrates natively with x402 micropayment flows and MCP-compatible agent orchestration.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:37.328Z","isFirstParty":false,"canonicalSlug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-8a0f4dea"}