{"uid":"cap_nq_3AQ7VjnZySZKoaZ85A","slug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-c241fb3c","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/malformed-json-healer)","url":"https://cve-intel.agentdiet.dev/v1/malformed-json-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_XnLQqynaAwRBEf0_xJw6C","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) into valid JSON so multi-agent pipelines don't crash","exampleAgentPrompt":"This JSON from the LLM is broken — it has trailing commas and is wrapped in markdown fences. Can you repair it so it's valid and parseable: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fix LLM output before downstream processing","prompt":"The model returned this JSON but it's malformed with trailing commas and backtick fences — repair it so I can pass it to the next step in my pipeline: ```{\"status\": \"ok\", \"items\": [1, 2, 3,],}```"},{"title":"Recover truncated agent response JSON","prompt":"My agent got cut off mid-response and the JSON is truncated and unparseable. Can you heal this broken output and give me valid JSON back: {\"user\": \"bob\", \"score\": 98, \"tags\": [\"vip\""},{"title":"Sanitize single-quoted JSON from prompt output","prompt":"The LLM gave me back JSON using single quotes instead of double quotes and it won't parse. Fix this so it's proper JSON: {'product': 'widget', 'price': 9.99, 'available': true}"}],"resultDescription":"A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes replaced with double quotes, and truncated structures closed — ready for downstream parsing without errors.","failureModes":["Input JSON is so severely malformed it cannot be deterministically inferred, returning an error or best-effort partial result","Input string is not JSON at all (e.g. plain text or HTML), resulting in a failure or empty response","Ambiguous truncation where multiple valid completions exist, potentially returning an incorrect but syntactically valid structure","Very large JSON strings may hit query parameter length limits when passed via GET"],"whenToPreferThis":"Choose this endpoint when LLM or agent-generated JSON is breaking downstream parsing in a multi-agent pipeline and you need a fast, deterministic fix — especially for common issues like trailing commas, markdown code fences, or single quotes. Prefer this over writing custom regex fixers when you need reliable, consistent repair across diverse LLM output formats in production pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:39:33.822Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471"}