{"uid":"cap_HC7pnLIlGHrYGD1j7RiqC","slug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635","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://x402-audit.agentdiet.dev/v1/repair)","url":"https://x402-audit.agentdiet.dev/v1/repair?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_lLb7LQRTJy_M2yFArYx2d","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"x402-audit.agentdiet.dev","brandSlug":"x402-audit-agentdiet-dev-mpp","brandBaseUrl":"https://x402-audit.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Deterministically repairs malformed, truncated, or markdown-wrapped JSON from LLM outputs so multi-agent pipelines can parse and continue without crashing.","exampleAgentPrompt":"This JSON came back from my LLM with trailing commas and markdown fences and it's breaking my pipeline — can you repair it and give me back valid JSON? Here's the raw string: ```{\\\"name\\\": \\\"Alice\\\", \\\"age\\\": 30,}```","exampleUseCases":[{"title":"Fix LLM output crashing agent pipeline","prompt":"My agent's JSON response has a trailing comma and a markdown code fence around it and my parser keeps throwing errors — can you clean it up and return valid JSON? The raw string is: ```{\\\"status\\\": \\\"ok\\\", \\\"score\\\": 0.95,}```"},{"title":"Repair single-quoted JSON from chatbot","prompt":"I got this JSON back from a chatbot but it uses single quotes instead of double quotes so it won't parse: {'user': 'bob', 'role': 'admin'} — can you fix it to be valid JSON?"},{"title":"Recover truncated JSON from model output","prompt":"My language model cut off mid-response and I got a truncated JSON object that's missing closing braces. Can you repair this string so it's valid JSON I can actually use: {\\\"items\\\": [\\\"apple\\\", \\\"banana\\\""}],"resultDescription":"Returns a JSON object containing the repaired, syntactically valid JSON — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing by agent pipelines.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns an error or best-effort partial result","Input is not JSON at all (e.g. plain prose) — repair cannot produce valid output","Extremely long truncated input may be cut off in ways that require guessing structure, leading to incorrect repair","Query parameter encoding issues if the raw_json contains special characters not properly URL-encoded"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails to parse due to common LLM output artifacts — trailing commas, markdown code fences, single quotes, or truncation. It is especially valuable in automated pipelines where crashing on malformed JSON is unacceptable and you need a fast, deterministic (non-AI) fix rather than asking another LLM to re-generate the output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:35.712Z","isFirstParty":false,"canonicalSlug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635"}