{"uid":"cap_EBbj03DiI7-yjAkJs7YrF","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-921a3740","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/repair)","url":"https://hn-pulse.agentdiet.dev/v1/repair?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_cLnEoNqmnroGqQ2PJi9Ze","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) so multi-agent pipelines never crash","exampleAgentPrompt":"This JSON string from the LLM is broken — it has trailing commas and markdown fences — can you repair it so my pipeline doesn't crash? Here it is: ```{\"name\": \"Alice\", \"score\": 42,}```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"The language model just returned malformed JSON with a trailing comma and markdown code fences — can you clean it up and give me valid JSON I can parse? The raw output is: ```{\"status\": \"ok\", \"items\": [1, 2, 3,]}```"},{"title":"Recovering truncated JSON response","prompt":"My AI returned a JSON string that got cut off mid-way, it ends abruptly without closing brackets. Can you repair this truncated JSON so I can use it: '{\"user\": \"bob\", \"data\": {\"score\": 95'"},{"title":"Normalizing single-quoted JSON from LLM","prompt":"The model output JSON using single quotes instead of double quotes and it's breaking my parser. Fix this for me: {'product': 'widget', 'price': 9.99, 'available': true}"}],"resultDescription":"A repaired, valid JSON object ready for downstream parsing. The response contains the corrected JSON structure with all syntax errors resolved, including closed brackets, normalized quote styles, removed trailing commas, and stripped markdown fences.","failureModes":["Input is so severely malformed it cannot be deterministically repaired — returns error indicating unrecoverable JSON","Input string is empty — rejected by minLength:1 validation","Ambiguous truncation with no recoverable structure — returns partial repair or error","Network timeout on the endpoint — agent should retry with Idempotency-Key header"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that fails to parse due to common LLM formatting errors like trailing commas, markdown fences, single quotes, or truncation. Ideal for production agent workflows where JSON parse failures would cause crashes and a deterministic (non-generative) repair is preferred over asking the LLM to re-generate its output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-24T18:50:57.856Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}