{"uid":"cap_G3zQ4LXQfDF93x6uRaeKQ","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e077a04e","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/llm-json-schema-healer)","url":"https://defi-yield.agentdiet.dev/v1/llm-json-schema-healer?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_vUKANltQFO7cqKEEDhosg","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, unclosed brackets, single quotes) so multi-agent pipelines never crash on bad JSON.","exampleAgentPrompt":"This LLM output came back as broken JSON with trailing commas and markdown code fences — can you repair it into valid JSON so the next step in my pipeline doesn't crash? Here's the raw string: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My AI agent just returned this JSON but it has trailing commas and single quotes and my parser is crashing — can you repair it into valid JSON? Here it is: {'user': 'bob', 'score': 99,}"},{"title":"Stripping markdown fences from model response","prompt":"The model wrapped its JSON answer in triple-backtick markdown fences and my downstream tool can't parse it. Please strip the fences and fix any other issues so I get clean JSON back."},{"title":"Recovering truncated JSON from a long completion","prompt":"My LLM hit its token limit and returned a truncated JSON object — it's missing the closing brackets. Can you repair and complete it so I can keep processing? Here's the broken output: {\"items\": [{\"id\": 1, \"name\": \"widget\""}],"resultDescription":"Returns a repaired, valid JSON object with the malformed input corrected — trailing commas removed, markdown fences stripped, single quotes replaced with double quotes, truncated structures closed, and the structure normalized to spec-compliant JSON.","failureModes":["Input is so corrupted that deterministic repair is impossible — returns error with explanation","Input string is empty or missing the raw_json field — returns 400 validation error","JSON is ambiguous after truncation and cannot be reliably completed — returns partial result with warning","Rate limit exceeded or payment required — returns 402 with x402 payment details"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails parsing due to common LLM formatting mistakes (trailing commas, markdown fences, single quotes, truncation). It is a deterministic repair tool rather than an AI re-generation approach, making it predictable, fast, and cheap at $0.002/call. Prefer it over writing custom regex or try/catch logic when you need a reliable, hosted JSON sanitization layer in your pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-24T18:52:04.791Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}