{"uid":"cap_cb9J8Ys99EbjuXGOpOT-C","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643","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/json-repair)","url":"https://mesh.agentdiet.dev/v1/json-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_ZgLFGDWgSB7f63em3CEVV","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":"Can you fix this broken JSON that came back from the LLM — it has trailing commas and markdown code fences wrapping it: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"The language model returned malformed JSON with a trailing comma and I need it repaired so my pipeline doesn't crash — here's the broken string: {\"status\": \"ok\", \"items\": [1, 2, 3,]}"},{"title":"Strip markdown fences from JSON","prompt":"My AI agent returned JSON wrapped in markdown code fences and single-quoted keys, can you clean it up so I can parse it? Here it is: ```json {'user': 'bob', 'score': 42}```"},{"title":"Recover truncated JSON response","prompt":"I got a truncated JSON response from the model that got cut off mid-string — can you repair it and give me valid JSON back? The broken output is: {\"results\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2, \"name\":"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input. The response replaces or removes syntactic issues (trailing commas, markdown fences, single quotes, truncation) and returns a parseable JSON structure ready for downstream agent consumption.","failureModes":["Input is so heavily corrupted that deterministic repair is impossible — returns error or best-effort partial result","Input is not JSON-like at all (e.g. plain prose) — repair may return empty object or error","Extremely long truncated JSON may have ambiguous structure that cannot be deterministically completed","Missing required raw_json parameter returns a 400 or validation error","Payment failure via x402 returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails JSON.parse() due to common LLM artifacts like trailing commas, markdown code fences, single-quoted keys, or truncation. It is purpose-built for deterministic, reproducible repair rather than probabilistic LLM re-prompting, making it ideal for automated pipelines that need reliable structured data without retry loops.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:50:54.888Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}