{"uid":"cap_Ax3D5lY2P9PIAuxbCMuFJ","slug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-d74380c2","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/structured-output)","url":"https://onchain-risk.agentdiet.dev/v1/structured-output?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_Z-XT-_N4AB298gHQV0v9k","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) into valid JSON so multi-agent pipelines never crash.","exampleAgentPrompt":"This JSON string came back from an LLM and it's broken — it has trailing commas, single quotes, and markdown fences — can you repair it into valid JSON: ```{'name': 'Alice', 'age': 30,}```?","exampleUseCases":[{"title":"Fix LLM JSON before downstream tool call","prompt":"The model returned this JSON wrapped in markdown with trailing commas and I need to pass it to another tool — can you clean it up and return valid JSON: ```json\n{\"items\": [\"apple\", \"banana\",],\n\"count\": 2,\n}```?"},{"title":"Recover truncated structured output","prompt":"My pipeline got a cut-off JSON response from the LLM and crashed — can you try to repair this truncated string into valid JSON: '{\"user\": \"bob\", \"score\": 42, \"tags\": [\"a\", \"b\"'?"},{"title":"Sanitize single-quoted agent response","prompt":"An agent in my workflow returned JSON with single quotes instead of double quotes and it's breaking my parser — can you fix this: {'product': 'widget', 'price': 9.99, 'available': true}?"}],"resultDescription":"A valid, repaired JSON object with all formatting issues resolved — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for safe downstream consumption in agent pipelines.","failureModes":["Input JSON is too severely corrupted to deterministically repair — returns error or best-effort partial result","Ambiguous truncation point makes reconstruction impossible — may return an incomplete object","Input string is empty or contains no JSON-like content — returns validation error","Extremely large inputs may hit size or timeout limits"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or markdown-wrapped JSON from an LLM and needs a deterministic fix before passing data downstream — especially when you need idempotent repair (via Idempotency-Key header) and cannot afford pipeline crashes due to bad structured output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:44:02.911Z","isFirstParty":false,"canonicalSlug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0"}