{"uid":"cap_XQ5ZjMhvIusM2hMhLRkss","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-53035bce","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/repair)","url":"https://serp-extract.agentdiet.dev/v1/repair?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_HyESCPPHb3hL61UyrWaD7","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 never crash.","exampleAgentPrompt":"This JSON string from my LLM is broken — it has trailing commas, single quotes, and a markdown code fence wrapping it. Can you repair it into valid JSON so my pipeline doesn't crash? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM output crashing agent pipeline","prompt":"My AI agent just returned this malformed JSON with trailing commas and it's crashing my downstream processor — can you repair it into clean, valid JSON? Here's the broken output: {\"items\": [\"apple\", \"banana\",], \"count\": 2,}"},{"title":"Strip markdown fences from model response","prompt":"My language model wrapped its JSON response in triple-backtick markdown fences and now I can't parse it. Can you clean that up and give me just the valid JSON object?"},{"title":"Recover truncated JSON from incomplete LLM generation","prompt":"My LLM hit its token limit mid-response and the JSON got cut off — something like {\"user\": \"bob\", \"scores\": [95, 87, 91. Can you try to repair and complete it into valid JSON?"}],"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 closed — ready for downstream parsing without crashes.","failureModes":["Input is so severely malformed that deterministic repair is not possible, returning an error","Input string is empty or not JSON-like at all","Truncated JSON is ambiguous and cannot be reliably completed","Payment required (HTTP 402) if x402 micropayment not provided"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline is producing malformed, truncated, or syntactically invalid JSON that needs deterministic repair before it reaches a JSON parser. Ideal for pipelines where LLM outputs frequently contain trailing commas, single quotes, or markdown fences, and you need a reliable, cheap ($0.002/call) fix without writing custom parsing logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:30:33.691Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}