{"uid":"cap_65-0vS6x_o_t59GE8jFa0","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-5b8f9764","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://defi-yield.agentdiet.dev/v1/malformed-json-healer)","url":"https://defi-yield.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_XIycOuV6iXgdcO2posYP1","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"defi-yield.agentdiet.dev","brandSlug":"defi-yield-agentdiet-dev-mpp","brandBaseUrl":"https://defi-yield.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 from my LLM is broken — it has trailing commas and markdown fences wrapping it — can you repair it so my pipeline doesn't crash? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"LLM output JSON repair in pipeline","prompt":"My language model keeps returning JSON wrapped in markdown code fences with trailing commas and it's crashing my downstream agent — can you clean and repair this JSON for me: ```json {\"status\": \"ok\", \"items\": [1, 2, 3,],} ```"},{"title":"Fix single-quoted JSON from AI agent","prompt":"I got this JSON back from an AI agent but it uses single quotes instead of double quotes and my parser won't accept it — can you fix it? Here it is: {'user': 'bob', 'score': 42}"},{"title":"Recover truncated JSON response","prompt":"My LLM returned a truncated JSON object that got cut off mid-string — it's missing closing brackets and it won't parse — can you repair this so I get valid JSON back: {\"report\": {\"summary\": \"The quarterly results show strong grow"}],"resultDescription":"A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures closed — ready for downstream parsing and use in multi-agent pipelines.","failureModes":["Input is so severely malformed that deterministic repair is not possible — returns error indicating unrecoverable JSON","Empty or whitespace-only raw_json input — returns validation error","Input is not JSON at all (e.g. plain prose) — may return error or unpredictable output","Extremely large JSON payloads may time out or be rejected","Network or payment (x402) failures returning HTTP 402 or 5xx"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline regularly produces syntactically invalid JSON — especially outputs with trailing commas, markdown code fences, single quotes, or truncation artifacts — and you need a fast, deterministic fix rather than asking another LLM to reformat it. Particularly useful in production pipelines where crashes from malformed JSON are costly and you need a reliable, cheap ($0.002/call) repair step.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:35.406Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}