{"uid":"cap_SCJV9tKZDl7weVpBYH6pl","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-f74a1fc0","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-validator)","url":"https://mesh.agentdiet.dev/v1/json-validator?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_AF0-ur5JcdJhFMYnlAHdz","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 LLM response came back as broken JSON with trailing commas and markdown code fences — can you fix it so it's valid and parseable: ```{\"name\": \"Alice\", \"score\": 42, }```?","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"The language model just returned this JSON with trailing commas and it's crashing my pipeline — please repair it so the next agent can parse it: {\"action\": \"buy\", \"ticker\": \"AAPL\", \"qty\": 10,}"},{"title":"Strip markdown fences from JSON response","prompt":"My AI assistant wrapped its JSON in triple-backtick markdown fences and my parser is choking — can you clean this up and return valid JSON: ```json\n{\"status\": \"ok\", \"data\": [1, 2, 3]}\n```"},{"title":"Repair single-quoted JSON keys from LLM","prompt":"I got this malformed JSON back from a model that used single quotes instead of double quotes — fix it so it's RFC-compliant: {'user': 'bob', 'role': 'admin', 'active': true}"}],"resultDescription":"Returns a JSON object containing the repaired, valid JSON structure derived from the malformed input, enabling downstream agents or parsers to continue processing without errors.","failureModes":["Input is so severely truncated or corrupted that deterministic repair is impossible — returns an error indicating unrecoverable structure","Input is not JSON-like at all (e.g. plain text or binary) — returns a validation error","Payment not received or x402 authentication fails — returns HTTP 402 with payment instructions","Idempotency key collision with differing payloads — may return conflict or cached prior result"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than an LLM-based rewrite — ideal for production multi-agent pipelines where you need consistent, auditable fixes for known LLM JSON quirks like trailing commas, markdown fences, and single-quoted keys without introducing hallucination risk.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:44:12.611Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}