{"uid":"cap_0wneAyH3vSIFa5laDdmMw","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6907a3f7","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://hn-pulse.agentdiet.dev/v1/llm-json-schema-healer)","url":"https://hn-pulse.agentdiet.dev/v1/llm-json-schema-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_-YUY4vEhcujbuWCF4y8ne","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"hn-pulse.agentdiet.dev","brandSlug":"hn-pulse-agentdiet-dev-mpp","brandBaseUrl":"https://hn-pulse.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) into valid JSON so multi-agent pipelines don't crash.","exampleAgentPrompt":"This JSON came back from an LLM and it's broken — it has trailing commas, single quotes instead of double quotes, and a markdown code fence wrapping it. Can you fix it so it parses cleanly: ```{'name': 'Alice', 'age': 30,}```?","exampleUseCases":[{"title":"Fix LLM output before downstream tool","prompt":"The structured output from the last agent step is malformed — it has trailing commas and is wrapped in a markdown code block. Fix this so I can pass it to the next tool: ```json\n{\"tasks\": [\"write report\", \"send email\",], \"priority\": 'high'}\n```"},{"title":"Rescue crashed multi-agent pipeline","prompt":"My pipeline keeps crashing because the JSON coming back from the summarizer agent has single quotes and truncated brackets. Can you repair this broken JSON and give me a valid object back: {\"summary\": 'Q3 revenue grew 12%', \"highlights\": [\"margins improved\""}],"resultDescription":"A repaired, valid JSON object that has had syntax errors corrected — including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing.","failureModes":["JSON is so severely malformed that deterministic repair is impossible — returns error","Input string is empty or contains no JSON-like structure","Repair produces ambiguous result where original intent cannot be inferred","Rate limit or payment failure via x402"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based regeneration — ideal for multi-agent pipelines where you want predictable, fast, cost-effective JSON healing without re-invoking an expensive language model. Prefer this over manual parsing logic or LLM retry loops when the JSON is structurally close to valid but has common LLM-induced syntax issues like trailing commas, markdown wrapping, or single quotes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:33:28.726Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}