{"uid":"cap_TMW7ldlT2ddN2s7kRDaMW","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-93d6a1b0","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-fix)","url":"https://mesh.agentdiet.dev/v1/json-fix?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_aLvMEAqc0y5mD_z8B5PhU","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 JSON from LLM outputs so multi-agent pipelines can reliably parse structured data","exampleAgentPrompt":"Can you fix this broken JSON I got from an LLM — it has trailing commas and markdown code fences wrapping it: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM JSON in agent pipeline","prompt":"My agent pipeline just crashed because the upstream LLM returned JSON with trailing commas and a markdown code fence — can you repair this so I can pass it to the next step: ```json {\"user\": \"bob\", \"score\": 95,} ```"},{"title":"Repair truncated JSON from model output","prompt":"The model cut off mid-response and I got this incomplete JSON that's missing closing braces: '{\"items\": [{\"id\": 1, \"name\": \"widget\"' — can you deterministically repair it into valid JSON?"},{"title":"Normalize single-quoted JSON from scraper","prompt":"I scraped some data and it came back with single quotes instead of double quotes, like {'key': 'value', 'count': 42} — can you convert this to valid JSON so I can parse it?"}],"resultDescription":"Returns a repaired, valid JSON object where the input malformed string has been deterministically fixed — removing markdown fences, correcting trailing commas, converting single quotes to double quotes, and closing any truncated structures — ready for downstream parsing by an agent or application.","failureModes":["Input is so corrupted that deterministic repair is impossible — returns error indicating unparseable input","Input string is empty or missing raw_json parameter — returns 400 validation error","JSON is too truncated or structurally ambiguous to infer correct closing — may return best-effort or error","Rate limit or payment (x402) failure if USDC balance insufficient — returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common LLM output artifacts like markdown fences, trailing commas, or single quotes. It is especially valuable in automated pipelines where downstream agents expect valid JSON but upstream LLMs frequently produce syntactically invalid output. Prefer this over manual regex fixes or custom parsers when you need a deterministic, hosted solution that handles multiple classes of JSON malformation in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:20.199Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}