{"uid":"cap_HPf_u-RmOor8D_0zeaw8e","slug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-cd9c759e","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/llm-json-schema-healer)","url":"https://cve-intel.agentdiet.dev/v1/llm-json-schema-healer?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_a29xwRrALcolZSrLet7Qz","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-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines receive valid, schema-conformant output.","exampleAgentPrompt":"The JSON my LLM just returned has trailing commas and markdown fences and is crashing my pipeline — can you repair this string so it parses cleanly: '```json\\n{\"name\": \"Alice\", \"age\": 30,}\\n```'?","exampleUseCases":[{"title":"Fix crashed multi-agent pipeline output","prompt":"My agent pipeline just broke because the upstream LLM returned this garbled JSON with a trailing comma and backtick fences — can you repair it so I can continue processing: '```json\\n{\"status\": \"ok\", \"results\": [1, 2, 3,]}\\n```'?"},{"title":"Normalize single-quoted LLM JSON response","prompt":"The model returned JSON using single quotes instead of double quotes and it won't parse — please fix this so it's valid JSON: \"{'user': 'bob', 'score': 42}\""},{"title":"Recover truncated LLM JSON mid-stream","prompt":"My LLM response got cut off mid-object and the JSON is incomplete — something like '{\"report\": {\"title\": \"Q2 Summary\", \"sections\": [' — can you repair and close it so I get a valid JSON object back?"}],"resultDescription":"A repaired, valid JSON object where truncations are closed, trailing commas removed, markdown fences stripped, and single quotes converted to double quotes — ready for programmatic parsing without errors.","failureModes":["Input JSON is so severely malformed that deterministic repair is ambiguous — endpoint may return a best-effort result or an error indicating the string cannot be recovered","Empty or whitespace-only raw_json input returns a validation error","Non-JSON input (plain text, binary data) cannot be meaningfully repaired","Extremely long truncated inputs may time out or return partial repairs","Network or payment (x402) authentication failures return HTTP 402 or 5xx"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives structured JSON outputs that are frequently malformed due to model truncation, markdown formatting, or non-strict quoting — and you need a deterministic, rule-based fix rather than asking the LLM to re-generate. Prefer it over regex heuristics or manual post-processing when reliability and auditability matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:51:22.523Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471"}