{"uid":"cap_HkydJ-w7duASOs27g_9Cr","slug":"mcp-security-agentdiet-dev-deterministic-a2a-broken-json-repair-2b0b1d45","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/schema-repair)","url":"https://mcp-security.agentdiet.dev/v1/schema-repair?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_RqEGSjw4ysO0QMhDlc5OM","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 malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, fenced code blocks) so multi-agent pipelines can continue without crashing.","exampleAgentPrompt":"This JSON from the LLM has trailing commas, single quotes, and is wrapped in a markdown code block — can you repair it into valid JSON so my pipeline doesn't crash: ```{'name': 'Alice', 'score': 42,}```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"The AI just returned this broken JSON with trailing commas and markdown fences and my downstream agent is crashing — can you repair it into clean, parseable JSON? Here's the raw output: ```{'user': 'bob', 'status': 'active',}```"},{"title":"Recovering truncated JSON response","prompt":"My LLM call got cut off mid-response and the JSON is incomplete — something like {\"items\": [{\"id\": 1, \"name\": \"widget\" — can you deterministically repair and close it so I can extract the data?"},{"title":"Sanitizing single-quoted JSON before schema validation","prompt":"I have this JSON string that uses single quotes instead of double quotes and it won't pass my schema validator: {'company': 'Acme', 'revenue': 500000} — can you convert it to valid JSON format?"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of common LLM output artifacts including trailing commas, markdown code fences, single quotes, and truncation issues — ready for downstream parsing and schema validation in agent pipelines.","failureModes":["JSON too severely malformed to deterministically repair (ambiguous structure)","Input string is not JSON-like at all (plain text, binary)","Truncation so severe that the intended structure cannot be inferred","Empty or whitespace-only raw_json input failing minLength validation"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that has common formatting artifacts (trailing commas, markdown fences, single quotes) and you need a deterministic, low-latency fix at $0.002/call rather than re-prompting the LLM or writing custom parsing logic. Ideal for production pipelines where reliability and cost predictability matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:44:02.911Z","isFirstParty":false,"canonicalSlug":"mcp-security-agentdiet-dev-deterministic-a2a-broken-json-repair-fe1334e3"}