{"uid":"cap_5VaMelD6ofN7SKuRoe6CJ","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-66113549","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/llm-json-schema-healer)","url":"https://mesh.agentdiet.dev/v1/llm-json-schema-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_dadx6dfmPynEmRbXfyd1N","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 malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, markdown fences) so multi-agent pipelines can continue without crashing.","exampleAgentPrompt":"This JSON came back from the LLM with trailing commas and markdown fences — can you repair it so it's valid and parseable: ```json { 'name': 'Alice', 'score': 42, } ```?","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"The JSON my agent just returned has single quotes and a trailing comma and it's breaking my pipeline — clean it up and give me valid JSON: { 'user': 'bob', 'active': true, }"},{"title":"Stripping markdown fences from code block","prompt":"My LLM wrapped its JSON response in a markdown code block with backticks and now I can't parse it — strip the fences and repair it: ```json\n{\"items\": [1, 2, 3,]}\n```"},{"title":"Recovering truncated JSON from partial response","prompt":"My model got cut off mid-response and I ended up with truncated JSON — can you try to repair this so it's valid enough to use: {\"results\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2"}],"resultDescription":"A repaired, schema-valid JSON object derived from the malformed input, with common LLM formatting artifacts (trailing commas, markdown code fences, single quotes, truncations) corrected deterministically so the output can be safely parsed downstream.","failureModes":["Input JSON too severely truncated or corrupted to repair — returns an error or best-effort partial object","Ambiguous structure that cannot be deterministically resolved — may return a best-guess or failure response","Input is not JSON-like at all (e.g. plain prose) — endpoint may return an error","Network or payment (x402) authentication failure — HTTP 402 or 5xx response"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed or partially truncated JSON from an LLM and you need a deterministic, rules-based repair rather than asking the LLM to rewrite it. Ideal when you cannot afford another LLM call, need consistent output, or want to handle common LLM formatting artifacts (markdown fences, trailing commas, single quotes) automatically without custom regex code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:32.623Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}