{"uid":"cap_Z-kq7FflG-9-VMjnSFGwb","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186","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/repair)","url":"https://defi-yield.agentdiet.dev/v1/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_s8iH_7-DRUG6KsYT9zUBD","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 can parse them reliably","exampleAgentPrompt":"This JSON from my LLM output is broken — it has trailing commas, markdown code fences, and single quotes — can you repair it so I can parse it? Here it is: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent just returned this malformed JSON and my pipeline crashed: {\"items\": [\"foo\", \"bar\",], \"count\": 2,} — can you repair it so it's valid JSON I can use?"},{"title":"Strip markdown fences from model output","prompt":"The LLM wrapped its JSON response in markdown code fences like ```json ... ``` and now I can't parse it — can you clean that up and give me valid JSON back?"},{"title":"Repair single-quoted JSON from AI","prompt":"I got this JSON from an AI assistant but it used single quotes instead of double quotes: {'user': 'bob', 'score': 95} — can you fix it to proper JSON format?"}],"resultDescription":"A repaired, valid JSON object derived from the submitted malformed input — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready to be parsed by downstream agents or services.","failureModes":["Input is so severely truncated or corrupted that deterministic repair is impossible — returns error indicating unrecoverable JSON","raw_json parameter is missing or empty — returns validation error","Input is not JSON at all (e.g. plain text or binary) — may return partial or failed repair","Extremely large JSON strings may time out or be rejected"],"whenToPreferThis":"Choose this endpoint when an LLM or AI agent has produced JSON output that fails to parse due to common formatting issues like trailing commas, markdown code fences, single quotes, or truncation. It is ideal for multi-agent pipelines where downstream steps require valid JSON and you need a fast, deterministic fix rather than a probabilistic LLM-based rewrite. Prefer it over manual parsing logic or general-purpose LLM calls for repair tasks — it is purpose-built, cheap ($0.002/call), and deterministic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:49:18.854Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}