{"uid":"cap_wp3KITl6UPnts1CK6e_0D","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b2d0ecbf","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/schema-repair)","url":"https://hn-pulse.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_b-af7C8w821xiCd3a0CQF","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 malformed, truncated, or markdown-wrapped JSON strings from LLM outputs so multi-agent pipelines can parse them without crashing","exampleAgentPrompt":"This LLM output came back as broken JSON with trailing commas and markdown fences — can you repair it so I can use it downstream? Here's the raw string: ```{name: 'Alice', age: 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"My language model just returned this JSON but it has single quotes and a trailing comma and it's breaking my pipeline — fix it for me: {\"user\": 'Bob', \"score\": 42,}"},{"title":"Strip markdown fences from JSON response","prompt":"The AI wrapped its JSON in triple backtick markdown fences and now my parser is crashing — can you clean up this response so I just get plain valid JSON? Here it is: ```json\n{\"result\": \"success\"}\n```"},{"title":"Recover truncated streaming JSON","prompt":"My streaming LLM response got cut off halfway and the JSON is incomplete — it ends with just `{\"items\": [{\"id\": 1, \"name\": \"foo\"` — can you repair and close it into valid JSON?"}],"resultDescription":"A repaired, valid JSON object parsed from the input malformed string, with common issues like trailing commas, markdown fences, single quotes, and truncation resolved deterministically.","failureModes":["Input string is so corrupted that deterministic repair is impossible — returns error or partial result","JSON structure is ambiguous after truncation — repair may not match original intent","Very long JSON strings may hit query parameter length limits since raw_json is passed via GET query","Non-JSON input (e.g. plain text or XML) may produce unexpected repair attempts"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based guessing — ideal for multi-agent pipelines where predictability and speed matter. Prefer it over re-prompting the LLM when the malformation pattern is structural (trailing commas, markdown fences, single quotes, truncation) rather than semantic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:38.315Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}