{"uid":"cap_BiYf5d22EwKJBtz5k9Ib7","slug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0","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/repair)","url":"https://onchain-risk.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_9idmjZl63ye5aC2dLGEyi","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 LLM output came back as broken JSON with trailing commas and markdown code fences — can you repair it into valid JSON so the pipeline doesn't crash? Here's the raw string: ```{\"name\": \"Alice\", \"score\": 42,}```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"My language model returned this JSON with a trailing comma and it's breaking my downstream agent — can you fix it? The raw string is: {\"result\": \"success\", \"items\": [1, 2, 3,]}"},{"title":"Strip markdown fences from agent response","prompt":"The agent wrapped its JSON in triple backticks and my parser is choking on it — please strip the markdown fences and give me clean JSON from this string: ```json\n{\"status\": \"ok\", \"value\": 99}\n```"},{"title":"Recover single-quoted JSON from pipeline crash","prompt":"My pipeline crashed because the model used single quotes instead of double quotes in its JSON output — here's the broken string, please repair it: {'user': 'bob', 'active': true}"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncation corrected where possible, returned as a structured JSON response.","failureModes":["Input JSON too severely truncated to reconstruct — returns error indicating unrecoverable structure","Input string is not JSON-like at all — returns parsing error","Empty raw_json parameter — returns validation error for missing required field","Network timeout or service unavailability — returns HTTP 5xx"],"whenToPreferThis":"Use this endpoint when an LLM or agent in your pipeline produces malformed JSON that would otherwise crash downstream consumers — especially when dealing with trailing commas, markdown code fences, single-quoted keys/values, or minor truncation. Prefer this over writing custom regex or ad-hoc fixers when you need deterministic, reliable repair in a production multi-agent workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:53.507Z","isFirstParty":false,"canonicalSlug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0"}