{"uid":"cap_AfePBGsxlT75Z4h9WpqfR","slug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-5827b9d2","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/schema-repair)","url":"https://domain-osint.agentdiet.dev/v1/schema-repair?utm_source=zero.xyz","method":"GET","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_W22_FL1jrdCm-5I6CM4TW","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 never crash","exampleAgentPrompt":"This JSON from our LLM has trailing commas, single quotes, and a markdown code fence wrapping it — can you repair it so it parses cleanly? Here's the broken string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"The language model returned this JSON but it has a trailing comma and single quotes so my pipeline is crashing — can you repair it so it's valid JSON? Here's the raw output: {'status': 'ok', 'items': ['a','b',],}"},{"title":"Strip markdown fences from agent response","prompt":"My agent wrapped its JSON in triple backtick markdown fences and now I can't parse it — can you clean that up and give me the raw valid JSON? The string is: ```json\n{\"result\": \"success\"\n}```"},{"title":"Recover truncated JSON from partial LLM output","prompt":"The LLM got cut off mid-response and I got truncated JSON that ends abruptly without closing brackets — can you repair this and return the best valid JSON you can reconstruct from: {\"user\": \"bob\", \"score\": 42, \"tags\": [\"dev\""}],"resultDescription":"A repaired, valid JSON object derived from the malformed input, with common LLM output issues fixed including trailing commas removed, single quotes converted to double quotes, markdown code fences stripped, and truncated structures closed — returned as a parseable JSON response object.","failureModes":["Input JSON is so severely malformed that deterministic repair cannot produce a valid result","Empty or whitespace-only raw_json input returns an error","Input that is not JSON-like at all (plain text, HTML) may fail to repair","Extremely long truncated inputs may produce structurally incomplete but syntactically closed output","Missing required raw_json parameter returns a 400/422 error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common LLM formatting mistakes such as trailing commas, markdown code fences, single quotes, or truncation. It is ideal for deterministic, rule-based repair rather than LLM-based re-generation of JSON, making it fast, cheap, and predictable. Prefer it over asking the LLM to re-generate when you need a reliable, low-latency fix that won't introduce hallucinated values.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:54.922Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-544ae7e3"}