{"uid":"cap_mB6VDJ_KHMq3sYYd_hEfo","slug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-47c41bce","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/llm-json-schema-healer)","url":"https://mcp-compiler.agentdiet.dev/v1/llm-json-schema-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_L7OZ6gP53l4DZLTUvf6lB","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":"The LLM just returned this broken JSON with trailing commas and markdown fences — can you clean and repair it so it's valid and parseable: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM JSON in agent pipeline","prompt":"My AI agent just returned this malformed JSON with a trailing comma and single quotes that's crashing my pipeline — can you repair it and give me back valid JSON: {'user': 'Bob', 'score': 42,}"},{"title":"Strip markdown fences from LLM output","prompt":"The model wrapped its JSON in triple-backtick markdown fences and now it won't parse — can you strip that out and return clean valid JSON? Here's the output: ```json\n{\"status\": \"ok\", \"count\": 5}\n```"},{"title":"Recover truncated JSON from long generation","prompt":"My LLM got cut off mid-response and the JSON is incomplete and won't load — can you deterministically repair this truncated JSON so I can continue processing: {\"items\": [\"apple\", \"banana\""}],"resultDescription":"Returns a repaired, valid JSON object where all common LLM-induced malformations — trailing commas, markdown fences, single quotes, truncation — have been deterministically fixed and the output is parseable.","failureModes":["Input JSON is too severely corrupted to deterministically recover — returns error","Input string is not JSON-like at all — returns parsing error","Ambiguous truncation where multiple valid repairs exist — may return best-guess repair","Empty or whitespace-only input — returns validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline is producing malformed JSON outputs that need deterministic (not generative/AI-based) repair — especially for trailing commas, markdown code fences, single quotes, or truncated outputs. Prefer this over custom parsing logic when you need a reliable, pay-per-call microservice that handles the most common LLM JSON failure modes without hallucinating new content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:51.000Z","isFirstParty":false,"canonicalSlug":"mcp-compiler-agentdiet-dev-deterministic-a2a-broken-json-repair-987bc021"}