{"uid":"cap_iMQgMBFumiYlcuJCd3zKZ","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-f9464f27","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":"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_FwTCCEqv47p4QOynJLHEK","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":"This JSON from the LLM response is broken — it has trailing commas and markdown fences wrapping it. Can you repair it so I can parse it properly? Here it is: ```{\"name\": \"Alice\", \"score\": 95,}```","exampleUseCases":[{"title":"Fix LLM output mid-pipeline","prompt":"The language model returned malformed JSON with a trailing comma and I can't parse it downstream — please repair this string so the next step in my workflow doesn't crash: {\"status\": \"ok\", \"items\": [1, 2, 3,]}"},{"title":"Strip markdown fences from agent response","prompt":"My agent wrapped its JSON output in markdown code fences and it's breaking my parser. Can you clean up this string and return valid JSON? Here it is: ```json\n{\"user\": \"bob\", \"active\": true}\n```"},{"title":"Recover truncated JSON from LLM","prompt":"The model got cut off mid-response and the JSON is incomplete — it ends abruptly without closing braces. Can you repair this truncated JSON so I can extract the data: {\"product\": \"widget\", \"price\": 9.99, \"tags\": [\"sale\""}],"resultDescription":"A repaired, valid JSON object with all syntactic errors corrected — trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures closed — ready for downstream parsing and processing.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error indicating unrecoverable JSON","Input is not JSON at all (plain text, binary) — returns parse failure","Truncation too severe to infer intended structure — partial repair or error response","Payment not provided or insufficient — HTTP 402 response","Idempotency-Key reuse with different payload — may return cached result from original request"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from LLM outputs that frequently contain common syntactic errors like trailing commas, markdown code fences, or single quotes, and you need a fast, deterministic fix rather than a probabilistic LLM re-parse. Prefer this over asking the LLM to reformat its own output, which adds latency and token cost. Ideal for production agent pipelines where reliability and idempotency (via Idempotency-Key header) are critical.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:36:49.959Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}