{"uid":"cap_pm8bCthUezFKxjFL2JLtz","slug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-a6661976","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://llms-generator.agentdiet.dev/v1/llm-json-schema-healer)","url":"https://llms-generator.agentdiet.dev/v1/llm-json-schema-healer?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_fXdmcZHtAYvnENEhoeXMh","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"llms-generator.agentdiet.dev","brandSlug":"llms-generator-agentdiet-dev-mpp","brandBaseUrl":"https://llms-generator.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 came back from the LLM with trailing commas and markdown fences and it's crashing my pipeline — can you repair it into valid JSON? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My agent just returned this malformed JSON with trailing commas and it's breaking the next step in my pipeline — can you repair it so it parses cleanly? Here it is: {\"result\": \"ok\", \"score\": 0.95,}"},{"title":"Stripping markdown fences from JSON","prompt":"The LLM wrapped its JSON output in triple-backtick markdown fences and now my parser is failing — can you strip those out and give me clean valid JSON? Raw string: ```json\n{\"status\": \"active\", \"count\": 42}\n```"},{"title":"Repairing single-quoted JSON from AI output","prompt":"I got this JSON back from a model that used single quotes instead of double quotes and it won't parse — fix it to valid JSON: {'user': 'bob', 'score': 88}"}],"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 in an agent pipeline.","failureModes":["Input JSON too severely malformed to deterministically repair — returns error or best-effort partial output","Ambiguous truncation points where the intended structure cannot be inferred — may produce structurally valid but semantically incorrect JSON","Empty or whitespace-only raw_json input — returns validation error","Input too long or deeply nested — may time out or return partial repair","Non-JSON input (e.g. plain text, XML) passed as raw_json — may fail or return unexpected output"],"whenToPreferThis":"Choose this endpoint when an AI agent or multi-agent pipeline receives LLM-generated JSON that fails to parse due to common syntax issues like trailing commas, markdown code fences, single quotes, or truncation. It is purpose-built for deterministic, rule-based repair rather than LLM-based re-generation, making it faster, cheaper, and more predictable for high-volume pipeline use. Prefer it over manually parsing or re-prompting the LLM when you need a reliable, low-latency fix that won't hallucinate structure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:58.606Z","isFirstParty":false,"canonicalSlug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-76e2e18d"}