{"uid":"cap_S2KpJob9wh10IzPdCjSI9","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-d5c06921","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://serp-extract.agentdiet.dev/v1/malformed-json-healer)","url":"https://serp-extract.agentdiet.dev/v1/malformed-json-healer?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"limit":{"type":"integer","default":20,"maximum":100,"minimum":1,"description":"Maximum number of items to return per page (1-100)"},"cursor":{"type":"string","description":"Opaque pagination cursor for fetching the next page"},"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_h87FG26fWd96aPV4amttk","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"serp-extract.agentdiet.dev","brandSlug":"serp-extract-agentdiet-dev-mpp","brandBaseUrl":"https://serp-extract.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines can reliably parse LLM responses without crashing.","exampleAgentPrompt":"This JSON response from my LLM has trailing commas and markdown code fences and won't parse — can you repair it so I get a valid JSON object back? Here's the raw string: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fixing LLM output in agent pipelines","prompt":"My agent just got a response from GPT-4 but it's wrapped in markdown backticks and has a trailing comma — can you repair this raw string into valid JSON so the next step in my pipeline can process it?"},{"title":"Recovering truncated JSON from a model","prompt":"Claude cut off mid-response and left me with incomplete JSON that ends abruptly — can you deterministically fix and close this malformed string so I can parse it properly?"},{"title":"Normalizing single-quoted JSON from legacy LLM","prompt":"I've got a JSON blob with single quotes instead of double quotes coming out of an older model — can you convert it into valid, standards-compliant JSON I can pass to my schema validator?"}],"resultDescription":"A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures properly closed — ready for downstream parsing and processing.","failureModes":["Input is so corrupted that deterministic repair is impossible — returns error indicating unrecoverable JSON","raw_json parameter missing or empty — returns 400 validation error","Input is not JSON at all (plain text, binary data) — may return error or unexpected output","Extremely long truncated inputs may hit size limits","Payment not provided or failed — returns HTTP 402 requiring x402 micropayment"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed JSON from LLM outputs and needs a deterministic, rule-based repair (not a generative rewrite). Ideal when you need reliable, reproducible fixes for common LLM formatting artifacts like markdown fences, trailing commas, and single quotes, and want to avoid sending the broken JSON back to another LLM for correction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:49.481Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}