{"uid":"cap_-YoLGqtwLi_nrlGazfFln","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-31fb113a","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/repair)","url":"https://mesh.agentdiet.dev/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_4UWK1PKqMwnRa-Hi-CyBn","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 just returned this broken JSON with trailing commas and markdown fences — can you clean it up so I can parse it: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My AI agent just returned this malformed JSON with trailing commas and it's crashing my pipeline — fix it for me: {\"model\": \"gpt-4\", \"tokens\": 1500,}"},{"title":"Stripping markdown fences from JSON","prompt":"The language model wrapped its JSON response in triple backticks and now I can't parse it — can you strip the markdown and give me valid JSON? Here it is: ```json\n{\"status\": \"ok\", \"result\": 42}\n```"},{"title":"Recovering single-quoted JSON from scraper","prompt":"I got this JSON back from a scraper that uses single quotes instead of double quotes and it won't parse — can you repair it into valid JSON: {'user': 'bob', 'active': true}"}],"resultDescription":"A repaired, valid JSON object parsed from the originally malformed input, with issues like trailing commas, markdown code fences, single quotes, and truncation corrected deterministically. The response schema is a generic JSON object representing the fixed structure.","failureModes":["Input JSON is so heavily corrupted it cannot be deterministically repaired — ambiguous structure with no recovery path","Input string is completely empty or not JSON-like at all","Truncated JSON missing critical closing tokens that cannot be inferred","Payment failure via x402 protocol if USDC balance is insufficient","Rate limiting or network timeout if the endpoint is under load"],"whenToPreferThis":"Choose this endpoint when LLM or agent-generated JSON needs to be reliably parsed downstream and failures would break a multi-agent pipeline. Prefer it over manual regex patching when dealing with common LLM artifacts like trailing commas, markdown code fences, or single-quoted keys. Ideal for automated pipelines where JSON validity must be guaranteed before passing data to subsequent agents or tools.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:39.899Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}