{"uid":"cap_gtZWCAK-4fOQ7I3D5Es5C","slug":"token-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-609b3658","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/malformed-json-healer)","url":"https://token-intel.agentdiet.dev/v1/malformed-json-healer?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_L62JnIjCLaN_1ZvVYCQ9I","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 malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, fences) so multi-agent pipelines can safely parse LLM outputs without crashing.","exampleAgentPrompt":"The LLM just returned this broken JSON with trailing commas and markdown code fences — can you run it through the JSON healer to get back a clean, parseable object? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My agent got back this malformed JSON from the language model and the pipeline crashed — it has trailing commas and is wrapped in markdown fences. Can you repair it so I can keep processing? Here's the raw string: ```{\"status\": \"ok\", \"items\": [\"a\", \"b\",],}```"},{"title":"Recovering truncated JSON response","prompt":"The API returned a JSON string that got cut off mid-response — it's missing the closing brackets. Can you fix this truncated JSON so it's valid and parseable? Raw input: {\"user\": {\"id\": 42, \"name\": \"Bob\""},{"title":"Sanitizing single-quoted JSON from scraper","prompt":"My web scraper returned JSON using single quotes instead of double quotes and the JSON parser keeps rejecting it. Can you clean it up and give me valid JSON back? Here's the string: {'product': 'Widget', 'price': 9.99}"}],"resultDescription":"Returns a repaired, valid JSON object derived from the malformed input string, with all syntax errors (trailing commas, markdown fences, single quotes, truncations) corrected so the output is immediately parseable by standard JSON parsers.","failureModes":["Input so severely malformed that deterministic repair is impossible — returns error indicating unrecoverable JSON","Empty or whitespace-only raw_json parameter — returns validation error","Input that is not JSON at all (e.g. plain prose) — may return parse failure or best-effort empty object","Network or upstream service errors — returns HTTP 5xx or timeout"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair (not AI-generated guessing) for LLM pipeline outputs that have predictable syntax issues like trailing commas, markdown fences, or single-quote keys. Prefer it over manual regex fixes when you need a reliable, pay-per-call microservice that integrates into A2A and MCP workflows natively.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:44.986Z","isFirstParty":false,"canonicalSlug":"token-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-12f4b582"}