{"uid":"cap_klgoX_cGKyUK6YDXmUK6-","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-92b9b568","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/json-repair)","url":"https://defi-yield.agentdiet.dev/v1/json-repair?utm_source=zero.xyz","method":"POST","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_zY76lLUSbKALVt4VTCChg","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":"The LLM just returned a broken JSON string with trailing commas and markdown code fences — can you repair it so I can use it downstream? Here's the raw output: ```{\"name\": \"Alice\", \"score\": 42,}```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent pipeline keeps crashing because the LLM returns JSON with trailing commas and missing closing braces — can you repair this string so I can pass it to the next step: '{\"status\": \"ok\", \"items\": [1, 2, 3,'"},{"title":"Strip markdown fences from model output","prompt":"The model wrapped its JSON response in triple-backtick markdown fences and now my parser won't accept it — please clean and repair this: ```json\n{\"result\": \"success\", \"count\": 7}\n```"},{"title":"Recover truncated JSON from context limit","prompt":"My LLM hit its token limit mid-response and the JSON got cut off halfway through — can you repair this truncated JSON and give me back a valid object: {\"users\": [{\"id\": 1, \"name\": \"Bob\"}, {\"id\": 2"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input, with syntax errors corrected including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — returned as a proper JSON object ready for downstream consumption.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error with details","Input string is empty or missing raw_json field — returns 400 validation error","JSON is semantically ambiguous after truncation — repair may make best-effort structural assumptions","Payment not included or insufficient — returns HTTP 402 requiring x402 USDC payment"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that fails to parse due to common LLM output artifacts like trailing commas, markdown code fences, single quotes, or truncation from token limits. It is deterministic (not generative), so the repair is predictable and reproducible. Prefer it over custom regex fixes or trying to re-prompt the LLM, especially when latency or token cost matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:42:50.173Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}