{"uid":"cap_XhW3Fmpp0m_uZsx6HHIAh","slug":"preflight-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-cb574344","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://preflight.agentdiet.dev/v1/llm-json-schema-healer)","url":"https://preflight.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_CA_aRpcGML6pDqeew2O7u","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"preflight.agentdiet.dev","brandSlug":"preflight-agentdiet-dev-mpp","brandBaseUrl":"https://preflight.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) and validates it for use in multi-agent pipelines.","exampleAgentPrompt":"This JSON string from the LLM is broken — it has trailing commas and markdown fences around it. Can you repair it so I can use it downstream? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"LLM output repair in agent pipeline","prompt":"The model just returned this JSON but it's wrapped in markdown and has a trailing comma: ```{\"status\": \"ok\", \"score\": 0.95,}``` — can you clean it up and give me valid JSON?"},{"title":"Single-quote JSON normalization","prompt":"I got this from a Python agent that used single quotes instead of double quotes: {'user': 'bob', 'active': true} — can you convert it to proper JSON?"},{"title":"Truncated JSON recovery","prompt":"My LLM response got cut off mid-stream and the JSON is incomplete — here's what I have: {\"results\": [{\"id\": 1, \"name\": \"foo\"} — can you try to repair and close it out?"}],"resultDescription":"A JSON object containing the repaired, valid JSON output derived from the malformed input, suitable for direct use in downstream agent pipeline steps.","failureModes":["Input JSON too severely truncated to deterministically reconstruct — returns error or best-effort partial repair","Input string is not JSON-like at all — may return validation error","Ambiguous structure where multiple valid repairs are possible — deterministic approach picks one branch which may not match original intent"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse() due to common LLM formatting errors like trailing commas, markdown code fences, or single quotes. Prefer it over generic JSON libraries when you need a hosted, pay-per-call repair service that handles the full set of LLM-specific JSON pathologies without writing custom preprocessing logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:20.778Z","isFirstParty":false,"canonicalSlug":"preflight-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-1d25665d"}