{"uid":"cap_EuM7lkTmR0JHOt_sVAXpo","slug":"x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-d1273709","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://x402broker.com/v1/repair)","url":"https://x402broker.com/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_4K5XQhisNS5tLCbKxphjv","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"x402broker.com","brandSlug":"x402broker-com-mpp","brandBaseUrl":"https://x402broker.com","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 I got from the LLM is broken — it has trailing commas, markdown fences, and single quotes everywhere: ```{'name': 'Alice', 'age': 30,}``` — can you repair it into valid JSON?","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"The language model just returned this malformed JSON with trailing commas and markdown code fences — can you clean it up so I can pass it to the next step? Here it is: ```json\\n{\\\"name\\\": \\\"Bob\\\",\\n\\\"score\\\": 42,\\n}\\n```"},{"title":"Rescue truncated JSON mid-pipeline","prompt":"My agent pipeline crashed because the LLM truncated its JSON response halfway through — it ends abruptly at '{\"items\": [{\"id\": 1, \"val'. Can you repair it into something valid I can work with?"},{"title":"Sanitize single-quoted JSON from legacy tool","prompt":"I'm getting JSON from an old tool that uses single quotes instead of double quotes, like {'key': 'value', 'count': 5} — fix it to proper valid JSON so my downstream code doesn't break."}],"resultDescription":"Returns a repaired, syntactically valid JSON object that has been cleaned of markdown fences, trailing commas, single quotes, and other common LLM formatting artifacts, ready for downstream consumption in multi-agent pipelines","failureModes":["Severely truncated JSON that cannot be meaningfully reconstructed returns an error or best-effort partial result","Empty or non-JSON input may return a validation error","JSON that is too deeply nested or malformed beyond heuristic repair may fail","Network timeout if the service is temporarily unavailable"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline is receiving malformed, truncated, or improperly formatted JSON from language model outputs and needs a deterministic, low-cost fix before passing data downstream. Ideal for agentic workflows where LLM outputs frequently include markdown fences, trailing commas, or single quotes that break standard JSON parsers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:26.526Z","isFirstParty":false,"canonicalSlug":"x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-c53712d8"}