{"uid":"cap_SP3SoONTfSMaGrFsPGOlr","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-2090e16c","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/llm-json-schema-healer)","url":"https://serp-extract.agentdiet.dev/v1/llm-json-schema-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_9r32iXtS6BQK5AXkyJBqi","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, incomplete structures) so multi-agent pipelines can process them without crashing.","exampleAgentPrompt":"This JSON from my LLM is broken — it has trailing commas, single quotes, and a markdown code fence around it. Can you repair it so I can parse it properly? Here it is: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM output crashing pipeline","prompt":"My AI agent just returned this JSON and it's breaking my parser because of trailing commas and markdown backticks — can you clean it up and give me valid JSON back? Here's the raw output: ```{\"items\": [\"apple\", \"banana\",], \"count\": 2,}```"},{"title":"Recover truncated JSON from timeout","prompt":"My LLM response got cut off mid-JSON and now I have an incomplete object. Can you repair this truncated JSON so it's parseable: {\"user\": \"bob\", \"preferences\": {\"theme\": \"dark\", \"lang\":"},{"title":"Normalize single-quote JSON from agent","prompt":"I got JSON back with single quotes instead of double quotes and some extra commas — it won't parse with standard libraries. Fix this for me: {'product': 'widget', 'price': 9.99, 'tags': ['sale', 'new',]}"}],"resultDescription":"Returns a repaired, valid JSON object derived from the malformed input — with syntax errors corrected, markdown fences stripped, trailing commas removed, single quotes converted to double quotes, and truncated structures closed. The output is immediately parseable by standard JSON libraries.","failureModes":["Input so severely truncated or corrupted that valid repair is impossible — returns error or best-effort partial result","Input that is not JSON at all (plain text, binary) — may return an error indicating non-JSON input","Ambiguous repairs where multiple valid completions exist — deterministic repair may choose one interpretation that differs from original intent","Very large JSON strings may hit query parameter length limits via GET method"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline frequently receives malformed, truncated, or markdown-wrapped JSON that crashes downstream processing. It is especially useful when you cannot control the LLM output format directly and need a deterministic, cheap ($0.002/call) repair layer before schema validation or database ingestion. Prefer this over writing custom regex fixers or retrying the LLM call when speed and cost matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:33.108Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}