{"uid":"cap_YZDrukrlsj6Me4PH0gsYT","slug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-d95926c4","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://workflows.agentdiet.dev/v1/llm-json-schema-healer)","url":"https://workflows.agentdiet.dev/v1/llm-json-schema-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_-lEOWDwy37IBN75zs9u4Z","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"workflows.agentdiet.dev","brandSlug":"workflows-agentdiet-dev-mpp","brandBaseUrl":"https://workflows.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 LLM response came back as broken JSON with trailing commas and markdown fences — can you repair it so I can parse it? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix crashed multi-agent pipeline JSON","prompt":"My agent pipeline keeps crashing because the upstream LLM is returning JSON with trailing commas and single quotes — can you repair this broken output so the next step can parse it properly? Raw string: {\"status\": 'ok', \"items\": [1, 2, 3,]}"},{"title":"Strip markdown fences from LLM JSON","prompt":"The model wrapped its JSON response in triple backticks and now my parser can't handle it — please clean that up and give me a valid JSON object. Here's what came back: ```json\n{\"result\": \"success\", \"count\": 42}\n```"},{"title":"Recover truncated JSON from long LLM output","prompt":"The LLM hit its token limit and returned a truncated JSON object that's missing its closing brackets — can you deterministically repair it so I can extract the data? Here's the partial output: {\"users\": [{\"id\": 1, \"name\": \"Bob\""}],"resultDescription":"A repaired, schema-valid JSON object reconstructed from the malformed input, with syntax errors corrected (trailing commas removed, markdown fences stripped, single quotes converted to double quotes, truncated structures closed), returned as a structured JSON response ready for downstream parsing.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error indicating irrecoverable structure","Input is not JSON at all (e.g. plain text or binary) — returns parsing failure","Truncation is too deep to infer missing values — may return partially repaired object or error","raw_json parameter missing or empty — returns 400-level validation error","Rate limit or payment failure via x402 — returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that contains common syntax errors such as trailing commas, markdown code fences, single-quoted strings, or truncation artifacts, and you need a deterministic (non-LLM) repair rather than asking another model to re-generate the output. Particularly useful in high-throughput pipelines where reliability and cost predictability matter, and where re-prompting the LLM would be expensive or slow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:14.181Z","isFirstParty":false,"canonicalSlug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ded1fe6a"}