{"uid":"cap_fAwF6E0Ff_pupSAwlQ8ZA","slug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-f7cea650","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-compiler.agentdiet.dev/v1/schema-repair)","url":"https://mcp-compiler.agentdiet.dev/v1/schema-repair?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_GfWchY_u7YyIOBemz2IrU","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-compiler.agentdiet.dev","brandSlug":"mcp-compiler-agentdiet-dev-mpp","brandBaseUrl":"https://mcp-compiler.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 came back from the LLM with trailing commas and markdown fences and it's breaking my pipeline — can you repair it and give me valid JSON back? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fixing LLM output in multi-agent pipeline","prompt":"My agent just returned this malformed JSON with trailing commas and it's crashing the next step in my pipeline — can you repair it? Here's the raw string: {\"model\": \"gpt-4\", \"tokens\": 1500,}"},{"title":"Stripping markdown fences from AI response","prompt":"The LLM wrapped its JSON in triple backticks and now my parser is failing — can you clean up this raw output and give me proper JSON? The string is: ```json\n{\"status\": \"ok\", \"score\": 0.95}\n```"},{"title":"Recovering single-quoted JSON from agent output","prompt":"I got this JSON with single quotes instead of double quotes from an AI agent and it won't parse — can you fix it to valid JSON? Here it is: {'user': 'bob', 'active': true}"}],"resultDescription":"A repaired, valid JSON object where all malformations (trailing commas, markdown fences, single quotes, truncation) have been deterministically corrected, ready for immediate use in downstream pipeline steps.","failureModes":["JSON is too severely truncated or corrupted to deterministically repair — returns error or best-effort partial result","Input string is not JSON at all (e.g. plain text, binary) — may return parse error","Edge cases with deeply nested or extremely large JSON strings may hit query parameter length limits","Network or service unavailability returns HTTP 5xx"],"whenToPreferThis":"Choose this endpoint when an AI agent or LLM pipeline produces structurally malformed JSON (trailing commas, markdown fences, single quotes, truncation) and you need a deterministic, rule-based fix rather than an LLM re-generation. Ideal for multi-agent orchestration layers where reliability and low latency matter more than probabilistic correction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:40.635Z","isFirstParty":false,"canonicalSlug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-987bc021"}