{"uid":"cap_OtdKddDiAdWC-4X_FsIsg","slug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-8603cb95","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/malformed-json-healer)","url":"https://domain-osint.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_42A50Bp69_Y_WUioqS1Mz","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 JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines can process the result without crashing","exampleAgentPrompt":"The LLM returned this JSON with trailing commas and markdown fences and it's breaking my pipeline — can you fix it so it parses cleanly: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fix broken LLM response in agent pipeline","prompt":"My AI agent just returned this malformed JSON and my downstream code is crashing — can you repair it so it's valid? Here it is: ```{\"status\": \"ok\", \"items\": [\"a\", \"b\",]}```"},{"title":"Strip markdown fences from model output","prompt":"The model wrapped its JSON response in triple backticks and now my parser can't read it. Can you clean this up and give me a valid JSON object? Raw output: ```json\n{\"user\": \"bob\", \"score\": 42}\n```"},{"title":"Recover truncated JSON from crashed generation","prompt":"The LLM got cut off mid-response and I ended up with this incomplete JSON: {\"report\": {\"title\": \"Q3 Results\", \"data\": [1, 2, 3 — can you repair it into something valid that my code can actually use?"}],"resultDescription":"A repaired, syntactically valid JSON object derived from the malformed or truncated input. The response contains the corrected JSON structure with all common LLM output issues resolved — including trailing commas removed, markdown fences stripped, single quotes replaced with double quotes, and truncations closed.","failureModes":["Input JSON is so corrupted that no deterministic repair is possible — returns an error indicating unrecoverable input","Input string is empty or below minimum length — returns validation error","Ambiguous truncation with multiple plausible completions — may return best-effort result or error","Network or payment authorization failure — returns HTTP 402 or 5xx error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based re-generation — it is faster, cheaper, and fully reproducible. Ideal for multi-agent pipelines that must not introduce additional LLM calls to fix LLM outputs. Prefer this over prompt-retry loops when the JSON structure is partially intact but syntactically broken.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T00:49:10.119Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-544ae7e3"}