{"uid":"cap_GrKd4Az6bnU3X3JqjBsg5","slug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e00cac5c","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/structured-output)","url":"https://x402-audit.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_V6rnlZYY_UsrPZHCQeDux","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":"Repairs malformed, truncated, or markdown-wrapped JSON strings from LLM outputs so multi-agent pipelines can process them without crashing.","exampleAgentPrompt":"The LLM just returned this JSON with trailing commas and markdown fences and it's breaking my pipeline — can you fix it and give me back clean, valid JSON? Here's the raw output: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix crashed agent pipeline JSON","prompt":"My agent pipeline just broke because the LLM returned malformed JSON with trailing commas and missing brackets. Can you repair this so I can continue processing: {\"status\": \"ok\", \"items\": [\"a\", \"b\",]}"},{"title":"Strip markdown fences from LLM output","prompt":"The model returned its answer wrapped in triple-backtick markdown fences and now my downstream code can't parse it. Can you clean this up and return proper JSON? Here's what I got: ```json\n{\"result\": \"success\", \"count\": 5}\n```"},{"title":"Repair single-quoted JSON keys from AI response","prompt":"I got a JSON response from an LLM that used single quotes instead of double quotes for all the keys and values, and it won't parse. Can you fix it to valid JSON? The raw string is: {'user': 'bob', 'score': 42}"}],"resultDescription":"A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures completed — ready for downstream parsing.","failureModes":["JSON too severely malformed to deterministically repair (ambiguous intent)","Input string is not JSON at all (plain text or binary data)","Truncation too extreme to infer missing structure","Network timeout or service unavailability","Payment failure via x402 protocol"],"whenToPreferThis":"Choose this endpoint when an LLM or agent in your pipeline produces broken JSON that needs deterministic, rule-based repair rather than probabilistic re-generation. Ideal for multi-agent orchestration layers where reliability and consistency matter more than creative reinterpretation of malformed output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:42.231Z","isFirstParty":false,"canonicalSlug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635"}