{"uid":"cap_4ALSn71fEs1plwfrD0lfi","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-be688f67","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://mesh.agentdiet.dev/v1/malformed-json-healer)","url":"https://mesh.agentdiet.dev/v1/malformed-json-healer?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_VwE3cU911mHGk6fJqKrx_","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"mesh.agentdiet.dev","brandSlug":"mesh-agentdiet-dev-mpp","brandBaseUrl":"https://mesh.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 JSON but it won't parse — it has trailing commas and markdown code fences around it. Can you fix it so I can use it in the next step of my pipeline?","exampleUseCases":[{"title":"Fix broken LLM pipeline output","prompt":"My agent just returned JSON with trailing commas and it's crashing my pipeline — here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}``` — can you repair it so it's valid JSON?"},{"title":"Strip markdown fences from agent response","prompt":"The LLM wrapped its JSON output in triple backtick markdown fences and now I can't parse it. Can you clean it up and give me back plain, valid JSON?"},{"title":"Recover single-quoted JSON from tool output","prompt":"I got this JSON back from a tool that used single quotes instead of double quotes: {'status': 'ok', 'count': 5} — can you fix it into proper JSON format?"}],"resultDescription":"Returns a repaired, valid JSON object that has been cleaned of issues such as trailing commas, markdown code fences, single quotes instead of double quotes, and truncation artifacts — ready to be parsed and used in downstream agent pipeline steps.","failureModes":["Input is so severely malformed it cannot be deterministically repaired — returns error indicating unrecoverable JSON","Empty or whitespace-only raw_json input — returns validation error","Input is not JSON-like at all (e.g. plain prose) — may return error or best-effort partial result","Payment failure via x402 — returns HTTP 402 before processing"],"whenToPreferThis":"Use this endpoint when an LLM or agent in your pipeline emits JSON that fails standard JSON.parse due to common issues like trailing commas, markdown fences, or single quotes, and you need a deterministic (not AI-generated) fix that won't introduce hallucinated values. Prefer this over asking another LLM to fix the JSON, since this approach is deterministic, cheap, and won't alter the semantic content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:40:29.775Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}