{"uid":"cap_99i7X9pf78NLPFFh0Pffx","slug":"email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-a503021c","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":"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_A1eRMWJCPm_DsmVzzLo9h","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-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines can reliably parse structured outputs.","exampleAgentPrompt":"This JSON came back from the LLM with trailing commas and markdown code fences — can you repair it into valid JSON? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM output before pipeline continues","prompt":"The agent upstream returned this JSON but it has a trailing comma and it's wrapped in a markdown fence — can you clean it up so the next step doesn't crash? Here's the raw output: ```json {\"status\": \"ok\", \"items\": [1, 2, 3,],} ```"},{"title":"Repair single-quoted JSON from chatbot","prompt":"My chatbot returned this JSON using single quotes instead of double quotes and it's breaking my parser — fix it for me: {'user': 'Bob', 'score': 42}"},{"title":"Recover truncated structured output","prompt":"The model got cut off mid-response and the JSON is truncated — can you repair it into something valid? Here's what came back: {\"report\": {\"title\": \"Q2 Summary\", \"sections\": [\"revenue\", \"costs\""}],"resultDescription":"A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncation resolved where possible — ready for downstream parsing.","failureModes":["JSON is so corrupted that deterministic repair is impossible — returns error indicating unrecoverable input","Input string is not JSON-like at all — returns validation error","Truncation is too severe to infer closing structure — partial repair with warning","Empty or whitespace-only input — returns 400 bad request"],"whenToPreferThis":"Use this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse due to common formatting issues like trailing commas, markdown code fences, or single quotes. Prefer this over writing custom repair logic when you need a deterministic, idempotent, pay-per-call microservice that handles edge cases reliably without model inference overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:40:18.727Z","isFirstParty":false,"canonicalSlug":"email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-fee515ab"}