{"uid":"cap_0418ynWhDCnA9oEBbHgJE","slug":"email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-d10808d9","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://email-verify.agentdiet.dev/v1/malformed-json-healer)","url":"https://email-verify.agentdiet.dev/v1/malformed-json-healer?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_Z3NfCdVUpcq1Z4EnmMJX2","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"email-verify.agentdiet.dev","brandSlug":"email-verify-agentdiet-dev-mpp","brandBaseUrl":"https://email-verify.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 output from the LLM has trailing commas and markdown fences and is breaking my pipeline — can you repair it into valid JSON: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The language model returned this malformed JSON with a trailing comma and single quotes — fix it so I can pass it to the next agent: {\"user\": 'bob', \"score\": 42,}"},{"title":"Strip markdown fences from JSON","prompt":"My AI returned JSON wrapped in triple-backtick markdown fences and it's crashing my parser — can you clean it up and give me valid JSON? Here's the raw output: ```json\n{\"result\": \"ok\", \"count\": 5}\n```"},{"title":"Recover truncated JSON response","prompt":"I got a cut-off JSON string from the model because it hit the token limit — it ends abruptly mid-object. Can you repair it into something valid? Here it is: {\"items\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2"}],"resultDescription":"Returns a repaired, valid JSON object that has been deterministically fixed from the provided malformed input — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed. The response is a JSON object containing the healed output ready for downstream use.","failureModes":["Input is so severely truncated or corrupted that deterministic repair is not possible — returns an error or best-effort partial result","Input is not JSON at all (e.g. plain text or binary) — may return a validation error","Edge cases in deeply nested or ambiguous truncations may produce structurally valid but semantically incorrect JSON","Network or payment-related failures if x402 micropayment is not properly handled"],"whenToPreferThis":"Choose this endpoint when you have LLM or agent-generated JSON that is syntactically broken — such as trailing commas, markdown code fences, single-quoted keys/values, or truncated structures — and need a fast, deterministic fix before passing data downstream. Prefer this over writing custom regex or using a general-purpose code executor when reliability and speed matter in a multi-agent pipeline. It is especially useful in agentic workflows where LLM outputs must conform to strict schemas before being consumed by the next step.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:39:15.252Z","isFirstParty":false,"canonicalSlug":"email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-fee515ab"}