{"uid":"cap_fJv-Q-uX9m1y-Cgh6x_DD","slug":"email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-d95bdafc","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/structured-output)","url":"https://email-verify.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_99CZSyY1JauVmqiqtZ1Lg","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":"Accepts a malformed, truncated, or markdown-wrapped JSON string and returns a repaired, valid JSON object deterministically.","exampleAgentPrompt":"This JSON string came back from the LLM with trailing commas and markdown fences and it's crashing my pipeline — can you repair it and give me clean valid JSON? Here it is: ```json {\"name\": \"Alice\", \"age\": 30, } ```","exampleUseCases":[{"title":"LLM output crash prevention","prompt":"My language model keeps returning JSON wrapped in markdown code blocks with trailing commas and it's breaking my downstream processing — can you strip the fences, fix the commas, and give me valid JSON back? Here's the raw output: ```json {\"user\": \"bob\", \"score\": 42, } ```"},{"title":"Single-quote JSON normalization","prompt":"I got this JSON from a Python agent that used single quotes instead of double quotes and it won't parse: {'product': 'widget', 'price': 9.99} — can you convert it to valid JSON?"},{"title":"Truncated JSON recovery","prompt":"This JSON got cut off mid-stream from my streaming LLM call and now it's incomplete: {\"items\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2 — can you repair and complete it into valid parseable JSON?"}],"resultDescription":"A repaired, syntactically valid JSON object derived from the input malformed string. The response resolves trailing commas, removes markdown fences, converts single quotes to double quotes, and closes truncated structures so the output can be safely parsed by downstream agents or systems.","failureModes":["Input is so severely malformed that no deterministic repair is possible — returns an error or best-effort partial result","Input string is empty or whitespace — likely returns a validation error since minLength is 1","Input is not JSON-like at all (e.g. plain prose) — repair may fail or produce nonsensical output","Very long truncated JSON may be completed incorrectly if context is insufficient","Network or payment authentication failure (HTTP 402) if x402 micropayment is not provided"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair in an automated multi-agent pipeline where LLM outputs frequently contain markdown fences, trailing commas, or single quotes. Prefer it over ad-hoc regex fixes or prompting an LLM to fix its own output, as it provides consistent, reproducible repair without stochastic variation. Ideal for production pipelines where reliability and low latency matter more than probabilistic inference.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:19.271Z","isFirstParty":false,"canonicalSlug":"email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-fee515ab"}