{"uid":"cap_k2Ac_EcmLtZdgqNLoEwgC","slug":"email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-272a6d14","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":"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_RKCDl0ufXaGp1Kp5Qjznn","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) into valid JSON to prevent multi-agent pipeline crashes.","exampleAgentPrompt":"This JSON from my LLM has trailing commas and markdown code fences and it's crashing my pipeline — can you repair it and give me back valid JSON? Here it is: ```json {\"name\": \"Alice\", \"score\": 42,} ```","exampleUseCases":[{"title":"Fix GPT output in agent chain","prompt":"My agent just got this response from GPT and it has trailing commas and single quotes that are breaking my downstream parser — can you clean it up into valid JSON? Here's the raw output: {'name': 'Bob', 'items': ['a', 'b',],}"},{"title":"Strip markdown fences from LLM JSON","prompt":"The model returned its answer wrapped in a ```json ... ``` code block with a truncated structure at the end — can you strip the fences, fix the truncation, and give me back parseable JSON?"},{"title":"Validate repaired schema before database insert","prompt":"Before I insert this AI-generated record into the database, can you repair any malformed JSON issues and confirm it's valid? The raw string is: {\"user_id\": 99, \"tags\": [\"admin\", \"beta\",, \"status\": \"active\"}"}],"resultDescription":"Returns a repaired, valid JSON object derived from the malformed or truncated input string, with issues like trailing commas, markdown fences, single quotes, and truncation corrected deterministically.","failureModes":["Input JSON is too severely truncated or corrupted to recover — returns error or best-effort partial result","Input string is not JSON-like at all — may return validation error","Very large payloads may be rejected or hit query string length limits due to GET method constraints","Ambiguous repair cases may produce structurally valid but semantically incorrect JSON"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives raw LLM-generated JSON that fails standard JSON.parse due to common LLM formatting errors (trailing commas, markdown fences, single quotes, truncation). Ideal for automated pipelines where you cannot manually intervene and need a deterministic, programmatic fix rather than asking the LLM to regenerate its output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:39.839Z","isFirstParty":false,"canonicalSlug":"email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-fee515ab"}