{"uid":"cap_JqCRKCLkgjTlzda6Ylj5J","slug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-58edc229","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://cve-intel.agentdiet.dev/v1/schema-repair)","url":"https://cve-intel.agentdiet.dev/v1/schema-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_iqZIof1iG9pcU6uycUXhX","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"cve-intel.agentdiet.dev","brandSlug":"cve-intel-agentdiet-dev-mpp","brandBaseUrl":"https://cve-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Deterministically repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, fences) so multi-agent pipelines can continue without crashing.","exampleAgentPrompt":"This JSON I got back from the language model is broken — it has trailing commas and markdown fences around it. Can you repair it into valid JSON so my pipeline can keep running? Here's the raw string: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"LLM pipeline crash prevention","prompt":"The LLM output I just got has single quotes instead of double quotes and a trailing comma — can you fix it into valid JSON so my downstream agent can parse it? Here it is: {'user': 'bob', 'action': 'buy',}"},{"title":"Markdown fence stripping from model output","prompt":"My model returned a JSON block wrapped in triple-backtick markdown fences and I need clean parseable JSON — can you strip the fences and repair any issues? Here's the raw output: ```json\n{\"item\": \"widget\", \"qty\": 3,}\n```"},{"title":"Recovering truncated JSON from a timeout","prompt":"The LLM got cut off mid-response and the JSON is incomplete — it ends abruptly without closing braces. Can you deterministically repair and close it so my agent pipeline doesn't crash? Here's the broken string: {\"order_id\": \"abc123\", \"items\": [{\"sku\": \"X99\""}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream consumption in an agent pipeline.","failureModes":["Input is so severely malformed that deterministic repair is not possible, returning an error","Input is not JSON-like at all (e.g. plain prose), causing repair to fail or produce garbage","Truncation is too deep for structural inference, leaving ambiguous closing","Payment/402 flow not completed, blocking the request"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails JSON.parse() due to common LLM quirks — trailing commas, markdown fences, single quotes, or mid-stream truncation. It is deterministic (not generative), idempotent, and purpose-built for agent-to-agent reliability, making it ideal as a middleware step between LLM calls and downstream JSON consumers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T00:34:42.572Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471"}