{"uid":"cap_xJbqmBs1hCFAERmEwXked","slug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-abe00d9e","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/schema-repair)","url":"https://x402-audit.agentdiet.dev/v1/schema-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_aBWhgobaC_fuHXdPTgjqn","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 LLM JSON outputs (trailing commas, single quotes, fenced code blocks) so multi-agent pipelines can continue without crashing.","exampleAgentPrompt":"This LLM response came back as broken JSON with trailing commas and markdown fences — can you repair it so I can parse it? Here's the raw string: ```{\"name\": \"Alice\", \"score\": 42,}```","exampleUseCases":[{"title":"Fixing LLM output before downstream agent step","prompt":"The previous agent returned this malformed JSON: `{name: 'Bob', items: ['a', 'b',]}` — can you repair it so the next step in my pipeline doesn't crash?"},{"title":"Stripping markdown fences from model response","prompt":"My language model wrapped its JSON in triple-backtick markdown fences and it's breaking my parser. Can you clean up this string and give me valid JSON back: ```json\n{\"status\": \"ok\",}\n```"},{"title":"Recovering truncated JSON from a cut-off response","prompt":"My API response got cut off mid-stream and I ended up with this truncated JSON: `{\"user\": \"carol\", \"data\": [1, 2` — can you repair it and return something valid and parseable?"}],"resultDescription":"A repaired, schema-compliant JSON object that has been cleaned of common LLM-induced syntax errors including trailing commas, single-quoted keys/values, markdown code fences, and truncation artifacts — ready for deterministic parsing by downstream agents or systems.","failureModes":["JSON is too severely malformed to be deterministically repaired — endpoint may return an error or best-effort partial result","Input string is empty or not JSON-like at all, failing the minLength:1 constraint","Ambiguous truncation points may result in incomplete but technically valid JSON that loses data","Network or payment (x402) errors may prevent the call from completing"],"whenToPreferThis":"Choose this endpoint when a multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse() due to common LLM syntax errors (trailing commas, single quotes, markdown fences, truncation). It is deterministic rather than probabilistic, making it preferable to asking another LLM to reformat the JSON. Use it as a middleware step between LLM output and any downstream agent or system that requires strict JSON compliance.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:46.749Z","isFirstParty":false,"canonicalSlug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635"}