{"uid":"cap_Xh7B2sOG5fbIWCLMARWZv","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-0d2d562f","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/structured-output)","url":"https://mesh.agentdiet.dev/v1/structured-output?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_fkfABzq641ywttECiIXZL","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, fences) and validates the result so multi-agent pipelines never crash on bad JSON.","exampleAgentPrompt":"The last LLM step returned this broken JSON with trailing commas and markdown fences — can you repair it into valid JSON so I can pass it to the next step: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent pipeline just crashed because the language model returned malformed JSON with a trailing comma — can you fix this string so I can continue: `{\"status\": \"ok\", \"score\": 0.95,}`?"},{"title":"Strip markdown fences from model output","prompt":"The model wrapped its JSON in triple backticks and now my parser is failing — please repair this so it's clean valid JSON: ```json\n{\"result\": \"success\", \"items\": [1, 2, 3]}\n```"},{"title":"Recover truncated JSON from cut-off response","prompt":"The LLM response got cut off mid-output and now the JSON is incomplete — can you repair this truncated string into something valid: `{\"user\": \"bob\", \"scores\": [10, 20`?"}],"resultDescription":"A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready to be passed directly to downstream agents or parsers.","failureModes":["Input JSON is so severely malformed it cannot be deterministically repaired — returns error or best-effort partial object","Input string is not JSON at all (e.g. plain prose) — may return error or empty object","Truncated JSON missing critical structural context cannot be reliably closed — may produce incorrect schema","Payment not processed (x402 402 response) — call fails before repair is attempted"],"whenToPreferThis":"Choose this endpoint when LLM-generated JSON is crashing downstream agents due to syntax errors like trailing commas, markdown code fences, single quotes, or truncation — especially in automated multi-agent pipelines where you cannot tolerate runtime JSON parse exceptions and need a deterministic (not generative) fix.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:20.405Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}