{"uid":"cap_ISuVYxYliT5AKi-OfbqZ_","slug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-f5058773","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://x402-audit.agentdiet.dev/v1/llm-json-schema-healer)","url":"https://x402-audit.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_7RrucBuxFt8vOS7KUFx6n","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"x402-audit.agentdiet.dev","brandSlug":"x402-audit-agentdiet-dev-mpp","brandBaseUrl":"https://x402-audit.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 from the LLM is broken — it has trailing commas and markdown code fences around it. Can you run it through the JSON healer and give me back the fixed, parseable version?","exampleUseCases":[{"title":"Fix LLM output before database insert","prompt":"The language model returned this JSON but it has trailing commas and single quotes — it's crashing my pipeline before I can insert it into the database. Can you repair it so it's valid JSON?"},{"title":"Strip markdown fences from agent response","prompt":"My upstream agent wrapped its JSON output in markdown code fences like ```json ... ``` and now my parser is choking. Can you clean that up and return just the valid JSON object?"},{"title":"Recover truncated JSON in workflow","prompt":"This JSON got cut off mid-string — it looks like the LLM hit its token limit. Can you try to repair and complete it so the downstream agent can process it without crashing?"}],"resultDescription":"Returns a repaired, syntactically valid JSON object derived from the malformed input — with trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures closed where possible.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error or empty result","Truncation is too deep to reconstruct original intent — repaired output may not match original schema","Very long malformed JSON strings may hit query parameter length limits since input is passed via GET","Ambiguous repair scenarios may produce valid but semantically incorrect JSON"],"whenToPreferThis":"Use this endpoint when LLM or agent outputs need to be reliably parsed as JSON downstream and the source frequently produces common formatting errors like markdown fences, trailing commas, or single quotes. Ideal for multi-agent pipelines where a crashed JSON parser would halt the workflow. Prefer this over custom regex-based cleanup when you need deterministic, predictable repair behavior across varied malformation types.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:47.241Z","isFirstParty":false,"canonicalSlug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635"}