{"uid":"cap_T-7ugmqcjPQaAzXNn82RS","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-716d0868","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":"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_3QfqYi71g-joYDqZRx6gS","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 from my LLM output is broken — it has trailing commas and markdown fences around it — can you repair it and give me back valid, parseable JSON? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My AI pipeline keeps crashing because the language model is returning JSON with trailing commas and missing closing brackets — can you fix this raw string and give me back valid JSON so I can continue processing? Here's the bad output: {\"user\": \"bob\", \"score\": 42,}"},{"title":"Strip markdown fences from AI response","prompt":"The LLM wrapped its JSON output in markdown code fences and now my parser is failing — can you clean this up and return just the valid JSON object? The raw string is: ```json\n{\"result\": \"success\", \"items\": [1, 2, 3]}\n```"},{"title":"Repair single-quoted JSON from chatbot","prompt":"I got this JSON back from a chatbot that used single quotes instead of double quotes and my downstream service won't accept it — can you convert it to valid JSON? Here it is: {'name': 'Charlie', 'active': true}"}],"resultDescription":"Returns a repaired, schema-valid JSON object derived from the malformed input string, with all syntax errors (trailing commas, markdown fences, single quotes, truncation) corrected so it can be parsed by standard JSON parsers.","failureModes":["Input is so severely malformed that repair is not deterministically possible — returns error indicating unrecoverable JSON","Empty or null raw_json field — returns validation error","Input is not JSON at all (e.g. plain text, binary) — returns parse failure","Idempotency-Key collision with differing payloads — may return cached prior result"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsing due to common syntax errors like trailing commas, markdown code fences, single-quoted keys, or truncated output. It is specifically designed for deterministic repair of AI-generated JSON rather than general data transformation, making it ideal for fault-tolerant agent workflows where downstream steps require strictly valid JSON.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:33:53.176Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}