{"uid":"cap_K60sYuAtso4Pn2pKZDo_g","slug":"mcp-security-agentdiet-dev-deterministic-a2a-broken-json-repair-4270b4b8","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://mcp-security.agentdiet.dev/v1/json-normalizer)","url":"https://mcp-security.agentdiet.dev/v1/json-normalizer?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_Aml5oL2euzZTP7jgY2aze","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"mcp-security.agentdiet.dev","brandSlug":"mcp-security-agentdiet-dev-mpp","brandBaseUrl":"https://mcp-security.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) into valid, parseable JSON for use in multi-agent pipelines","exampleAgentPrompt":"This LLM output keeps crashing my pipeline — can you repair this broken JSON for me: ```{\"name\": \"Alice\", \"age\": 30,}``` — it has a trailing comma and markdown fences that need to be stripped and fixed.","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My AI just returned this malformed JSON with a trailing comma and single quotes — {'user': 'bob', 'score': 42,} — can you repair it into valid JSON so I can pass it to the next step in my workflow?"},{"title":"Stripping markdown fences from JSON","prompt":"The LLM wrapped its JSON response in triple backtick markdown fences again and it's breaking my parser. Here's the raw output: ```json\n{\"result\": \"success\", \"count\": 5}\n``` — please clean it up into plain valid JSON."},{"title":"Recovering truncated JSON response","prompt":"My model got cut off mid-response and returned incomplete JSON like {\"items\": [{\"id\": 1, \"name\": \"foo\"} — can you repair and complete this truncated JSON so it's valid and parseable?"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed or truncated input, with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready to be parsed and passed downstream.","failureModes":["JSON too corrupted to deterministically repair — returns error or partial result","Input is not JSON-like at all — unrecognized format","Ambiguous truncation with multiple valid completions — may return best-guess repair","Network or payment (x402) authentication failure","Empty or missing raw_json parameter — validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline frequently receives malformed, truncated, or markdown-wrapped JSON that breaks downstream parsers. It is specifically optimized for LLM output artifacts (trailing commas, single quotes, code fences) and offers deterministic repair rather than probabilistic generation, making it suitable for production pipelines requiring reliability. Prefer this over generic JSON libraries when the malformed input originates from LLM completions in A2A or MCP workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:47.033Z","isFirstParty":false,"canonicalSlug":"mcp-security-agentdiet-dev-deterministic-a2a-broken-json-repair-fe1334e3"}