{"uid":"cap_so-9KK6W_DG3eg_1fWUr2","slug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-6141dcce","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://domain-osint.agentdiet.dev/v1/repair)","url":"https://domain-osint.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_X70zOocYB0Q2PQKg9Evji","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"domain-osint.agentdiet.dev","brandSlug":"domain-osint-agentdiet-dev-mpp","brandBaseUrl":"https://domain-osint.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) into valid, parseable JSON for use in multi-agent pipelines.","exampleAgentPrompt":"The LLM just returned this garbled JSON with trailing commas and markdown fences — can you repair it into valid JSON I can actually use? Here it is: ```{\"name\": \"Alice\", \"score\": 42,}```","exampleUseCases":[{"title":"Fix crashed agent pipeline JSON","prompt":"My agent pipeline crashed because the LLM returned JSON with a trailing comma and it failed to parse — can you fix this string for me so the next step can proceed? The broken output is: {\"status\": \"ok\", \"items\": [\"a\", \"b\",]}"},{"title":"Strip markdown fences from LLM output","prompt":"The model wrapped its JSON response in triple-backtick markdown fences again and now my code can't parse it — please repair this raw output into clean JSON: ```json\n{\"result\": true, \"count\": 5}\n```"},{"title":"Recover single-quoted JSON from LLM","prompt":"I got a JSON blob back from the language model that uses single quotes instead of double quotes and my JSON parser is throwing errors — can you convert this into valid JSON? Here it is: {'user': 'bob', 'active': true}"}],"resultDescription":"A repaired, valid JSON object derived from the input malformed string, with issues like trailing commas, markdown code fences, single-quoted keys/values, and truncation corrected so the output is immediately parseable by standard JSON parsers.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns an error object indicating unparseable input","Input string is empty or missing the required raw_json field — returns 400 validation error","JSON structure is ambiguous after truncation and repair produces an incorrect but syntactically valid result — no error raised","Network timeout or service unavailability — returns 5xx error"],"whenToPreferThis":"Choose this endpoint when LLM or agent outputs are producing malformed JSON that breaks downstream pipeline steps, especially when you need deterministic (non-AI-based) repair that is fast, cheap, and consistent. Prefer this over re-prompting the LLM when latency and cost matter, or when the malformation is structural (commas, fences, quoting) rather than semantic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:42:47.532Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-544ae7e3"}