{"uid":"cap_8ftJkGFOyjVrlu-LbyFIG","slug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-dfc150d7","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":"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_8FGITT9SXScYvR81FMOo3","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 from my LLM is broken — it has trailing commas, single quotes, and a markdown code fence wrapper. Can you repair it into valid JSON so my pipeline doesn't crash? Here it is: ```json {'name': 'test', 'value': 42,}```","exampleUseCases":[{"title":"Fix crashed agent pipeline JSON","prompt":"My LLM just returned this mangled JSON with trailing commas and backtick fences and my downstream agent is crashing — can you repair it into valid JSON so I can continue the workflow? Here's the broken output: ```json {'status': 'ok', 'items': ['a', 'b',],}```"},{"title":"Sanitize single-quoted LLM response","prompt":"The AI response I got back uses single quotes instead of double quotes and has a trailing comma — can you fix this so it's valid JSON I can actually parse? Raw string: {'model': 'gpt-4', 'confidence': 0.95,}"},{"title":"Recover truncated JSON from streaming output","prompt":"My streaming LLM response got cut off halfway through and now the JSON is incomplete and unparseable. Can you deterministically repair this truncated JSON and give me back a valid object? Here it is: {\"results\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2, \"nam"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of common LLM output artifacts including trailing commas, markdown code fences (backticks), single quotes, and truncation issues — returned as a parseable JSON object ready for downstream agent consumption","failureModes":["JSON is too severely corrupted to deterministically repair — returns error indicating repair was not possible","Input string is not JSON at all (e.g. plain prose) — may return parse failure","Ambiguous truncation that could resolve to multiple valid structures — may return best-guess or error","Very large malformed JSON strings may exceed query parameter length limits","Missing required raw_json parameter returns 400 error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or markdown-wrapped JSON from an LLM and needs deterministic (not AI-based) repair before passing data to a downstream tool. Ideal for production agent orchestration where reliability matters and you cannot afford nondeterministic re-prompting. Prefer over regex-based manual fixes when the malformations are compound (e.g. both trailing commas AND markdown fences AND single quotes at once).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:51:34.449Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471"}