{"uid":"cap_T6FeTmOEc15AC4-e3TzTi","slug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-85164a7d","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/structured-output)","url":"https://cve-intel.agentdiet.dev/v1/structured-output?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_3TVmu8xZPRcKaEEIxSnbE","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":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.","exampleAgentPrompt":"This JSON came back from the LLM with trailing commas and markdown fences and it's breaking my pipeline — can you repair it and give me back a clean, valid JSON object? Here's the raw output: ```json {\"name\": \"Alice\", \"score\": 42,} ```","exampleUseCases":[{"title":"Fixing LLM pipeline broken JSON","prompt":"The language model just returned this malformed JSON with a trailing comma and single quotes — it's crashing my downstream parser. Can you repair it and give me back valid JSON? Raw output: {'user': 'bob', 'score': 99,}"},{"title":"Stripping markdown fences from agent output","prompt":"My agent wrapped its JSON response in markdown code fences and now I can't parse it. Here's the raw string: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3]}\n``` — please strip the fences and return clean JSON."},{"title":"Recovering truncated JSON from timeout","prompt":"The LLM timed out mid-generation and gave me a truncated JSON that's missing the closing brackets. Can you deterministically repair this so my workflow can continue? Here's what I got: {\"results\": [{\"id\": 1, \"name\": \"foo\"}"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input, with all syntax errors corrected including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed.","failureModes":["Input JSON is so severely malformed it cannot be deterministically repaired — returns error indicating repair failure","Input string is empty or below minimum length — returns 400 validation error","The malformed content is ambiguous enough that repair introduces incorrect structure — repaired JSON may not match original intent","Network timeout or service unavailability returns 5xx error","Payment not attached or insufficient — returns HTTP 402 payment required"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or markdown-wrapped JSON from an LLM and needs deterministic repair rather than probabilistic re-generation. Ideal for production pipelines where reliability matters and you cannot afford to re-query the LLM. Prefer this over manual parsing heuristics or custom code when you need a standardized, repeatable fix across trailing commas, single quotes, and markdown fences in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:37:21.372Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471"}