{"uid":"cap_j5Elr7DcfElLb9prZIfeY","slug":"token-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-c29b2bd4","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://token-intel.agentdiet.dev/v1/schema-repair)","url":"https://token-intel.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_DEV5zWSQiyLxLQdLnb12A","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"token-intel.agentdiet.dev","brandSlug":"token-intel-agentdiet-dev-mpp","brandBaseUrl":"https://token-intel.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":"The LLM returned this broken JSON with trailing commas and markdown fences — can you repair it so it parses cleanly: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent pipeline just crashed because the upstream LLM returned JSON with trailing commas and single quotes — can you repair this string so it's valid JSON I can pass downstream: {name: 'Bob', scores: [1, 2, 3,]}?"},{"title":"Strip markdown fences from agent output","prompt":"The model wrapped its JSON response in triple backticks and now my parser is failing — take this markdown-fenced blob and give me back clean, parseable JSON: ```json\n{\"status\": \"ok\", \"value\": 42}\n```"},{"title":"Recover truncated JSON from LLM","prompt":"The LLM hit its token limit mid-response and the JSON got cut off — here's the truncated string: {\"items\": [{\"id\": 1, \"title\": \"report\"} — can you repair it into valid JSON?"}],"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 truncated structures closed — ready to be parsed by any standard JSON parser in a downstream agent step.","failureModes":["Input JSON is so severely truncated that the structure cannot be inferred — returns an error or best-effort partial repair","Input contains non-JSON content entirely (e.g. plain prose) — may return an error indicating no JSON structure detected","Ambiguous repair paths where multiple valid completions exist — may choose one deterministically but could be semantically wrong","Very large JSON strings may hit query parameter length limits since the endpoint uses GET with a query param"],"whenToPreferThis":"Choose this endpoint when an AI agent or multi-agent pipeline receives LLM-generated JSON that fails to parse due to common issues like trailing commas, markdown code fences, single-quoted keys/values, or mid-stream truncation. It is particularly valuable as a middleware step between LLM output and any downstream JSON consumer to prevent pipeline crashes. Prefer it over writing custom regex or heuristic fixers when you need a deterministic, hosted repair service that handles a broad class of JSON malformations in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:37.029Z","isFirstParty":false,"canonicalSlug":"token-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-12f4b582"}