{"uid":"cap_3Pu8lNXvxAepQEzN8NYjz","slug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-1143d45b","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://onchain-risk.agentdiet.dev/v1/json-repair)","url":"https://onchain-risk.agentdiet.dev/v1/json-repair?utm_source=zero.xyz","method":"POST","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_YHps_4Bt3RZ1JGqjAUukB","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"onchain-risk.agentdiet.dev","brandSlug":"onchain-risk-agentdiet-dev-mpp","brandBaseUrl":"https://onchain-risk.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 the LLM is broken — it has trailing commas and markdown fences wrapping it. Can you run it through the JSON repair service and give me back a clean, valid version I can actually parse?","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The language model returned this JSON with a bunch of trailing commas and it's wrapped in triple backticks — can you repair it into valid JSON so the next step in my workflow doesn't crash?"},{"title":"Recover truncated structured response","prompt":"My LLM call timed out mid-response and the JSON got cut off halfway through. Can you try to repair this truncated JSON string and return whatever valid structure you can reconstruct from it?"},{"title":"Normalize single-quote JSON from scraper","prompt":"I've got a Python dict-style string with single quotes instead of double quotes coming from my scraper. Can you run it through the JSON repair endpoint and get me back proper valid JSON?"}],"resultDescription":"A repaired, syntactically valid JSON object reconstructed from the malformed or truncated input. The response resolves issues like trailing commas, markdown code fences, single-quoted keys/values, and incomplete structures, returning a clean JSON object ready for downstream parsing.","failureModes":["Input JSON is so severely corrupted that no valid structure can be recovered — returns error or empty object","Input string is completely non-JSON (e.g. plain prose) with no recoverable structure","Extremely large payloads may hit size limits","Network or payment-related failures (HTTP 402 if payment not provided)"],"whenToPreferThis":"Choose this endpoint when your AI agent pipeline receives LLM-generated JSON that fails standard parsing due to common LLM artifacts: trailing commas, markdown fences (``` code blocks), single-quoted strings, or truncated output. It's especially valuable in multi-agent orchestration flows where a single malformed output would otherwise crash the entire pipeline. Prefer it over writing custom regex fixers or retry logic when you need a deterministic, idempotent repair operation with predictable behavior.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:47:51.509Z","isFirstParty":false,"canonicalSlug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0"}