{"uid":"cap_bMWmeunz3eFQ5Y_32jEhy","slug":"prompt-guard-agentdiet-dev-deterministic-a2a-broken-json-repair-f2987000","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://prompt-guard.agentdiet.dev/v1/malformed-json-healer)","url":"https://prompt-guard.agentdiet.dev/v1/malformed-json-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_1nVfUJcvXIsQeeqLAusRy","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"prompt-guard.agentdiet.dev","brandSlug":"prompt-guard-agentdiet-dev-mpp","brandBaseUrl":"https://prompt-guard.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":"Can you fix this broken JSON from my LLM — it has trailing commas, markdown fences, and single quotes, and my pipeline keeps crashing trying to parse it: ```{name: 'Alice', age: 30,}```","exampleUseCases":[{"title":"LLM output JSON pipeline fix","prompt":"My AI agent just returned this JSON blob with trailing commas and markdown code fences and it's breaking my downstream parser — can you repair it so I get back valid JSON I can actually use?"},{"title":"Single-quoted JSON from chat model","prompt":"The chatbot gave me JSON using single quotes instead of double quotes and it fails JSON.parse — can you fix it: {'user': 'bob', 'score': 99}?"},{"title":"Truncated JSON recovery in automation","prompt":"My workflow automation got a JSON response that got cut off mid-string and now nothing parses — can you deterministically repair it and give me back something valid?"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input, with issues like trailing commas, markdown fences, single quotes, and truncation corrected so downstream parsers can consume it without errors.","failureModes":["Input too severely truncated or corrupted to infer valid structure — returns error or best-effort partial repair","Input is not JSON at all (plain text, binary) — may return error or empty result","Schema validation failure if repaired JSON doesn't match an expected schema","Network or payment (x402) errors preventing the request from completing"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsing due to common issues like trailing commas, markdown code fences, single quotes, or truncation — especially when you need a deterministic, rule-based fix rather than a probabilistic LLM re-generation of the JSON.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:17.255Z","isFirstParty":false,"canonicalSlug":"prompt-guard-agentdiet-dev-deterministic-a2a-broken-json-repair-9a6e7e44"}