{"uid":"cap_2qRdh0_yVxkLPYgiNBHHj","slug":"mcp-security-agentdiet-dev-deterministic-a2a-broken-json-repair-22850f50","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-validator)","url":"https://mcp-security.agentdiet.dev/v1/json-validator?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_nQHZG-PaaOy8ntHEtka16","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 JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines can process the result without crashing.","exampleAgentPrompt":"My LLM returned a broken JSON string with trailing commas and markdown code fences — can you repair it so I can parse it? Here's the raw output: ```json {\"name\": \"Alice\", \"age\": 30, } ```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"The language model in my pipeline returned malformed JSON with a trailing comma and backtick fences — please repair this so I can pass it to the next step: ```{\"items\": [\"apple\", \"banana\",]}```"},{"title":"Recovering truncated API response","prompt":"My AI model got cut off mid-response and the JSON is incomplete — can you fix this truncated output and make it valid JSON? Here it is: {\"user\": \"bob\", \"score\": 42, \"tags\": [\"dev\""},{"title":"Sanitizing single-quoted JSON from chatbot","prompt":"A chatbot gave me JSON using single quotes instead of double quotes and it's breaking my parser — please convert and repair this into valid JSON: {'name': 'Carol', 'active': true, 'roles': ['admin', 'user']}"}],"resultDescription":"A repaired, valid JSON object derived from the malformed input, with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncations resolved where possible.","failureModes":["Input JSON is too severely malformed or semantically ambiguous to deterministically repair","Input string is empty or whitespace only (minLength:1 enforced)","Truncated JSON missing critical closing structure that cannot be inferred","Payment/x402 authorization failure if credit balance is insufficient","Network timeout if the endpoint is temporarily unavailable"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline or LLM output stage produces syntactically broken JSON that needs deterministic, rule-based repair rather than AI re-generation. It is ideal for production pipelines where reliability and low latency matter, especially when the corruption is predictable (trailing commas, markdown fences, single quotes) rather than semantic corruption requiring re-inference.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:40:51.480Z","isFirstParty":false,"canonicalSlug":"mcp-security-agentdiet-dev-deterministic-a2a-broken-json-repair-fe1334e3"}