{"uid":"cap_X7dMFeZiqa4HlrQYqhnuH","slug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-c8d29f96","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://workflows.agentdiet.dev/v1/malformed-json-healer)","url":"https://workflows.agentdiet.dev/v1/malformed-json-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_7-Vc5J_-wdC44a315sKAs","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"workflows.agentdiet.dev","brandSlug":"workflows-agentdiet-dev-mpp","brandBaseUrl":"https://workflows.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 LLM response came back with broken JSON — it has trailing commas, single quotes, and markdown code fences — can you repair it so my pipeline can parse it: ```{name: 'Alice', age: 30,}```?","exampleUseCases":[{"title":"Fix LLM output crashing pipeline","prompt":"My agent got this JSON back from an LLM and it's crashing the next step — can you repair it? Here it is: {\"name\": \"Bob\", \"score\": 92,, \"tags\": ['fast', 'reliable']}"},{"title":"Strip markdown fences from API response","prompt":"This tool response came back wrapped in a markdown code block with backticks and it's not valid JSON anymore — please clean it up and give me a proper JSON object I can use."},{"title":"Recover truncated agent message","prompt":"My multi-agent pipeline received a truncated JSON message that got cut off mid-string — can you deterministically repair it and fill it out enough to be valid? Here's the broken payload: {\"task\": \"summarize\", \"content\": \"The quarterly earnings report showed"}],"resultDescription":"Returns a repaired, well-formed JSON object that has been cleaned of common LLM output artifacts such as trailing commas, markdown fences, single-quoted keys/values, and truncation issues — ready for downstream parsing in multi-agent pipelines.","failureModes":["Input JSON is so severely malformed that deterministic repair is not possible","Empty or non-JSON input string","JSON truncation too deep to reconstruct structure","Rate limiting or payment failure via x402 protocol"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline or LLM workflow is receiving broken, truncated, or syntactically invalid JSON that needs to be deterministically repaired rather than re-generated — especially when you need reliability and repeatability over probabilistic LLM-based repair. Ideal for production pipelines where you cannot retry the upstream LLM call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:33.271Z","isFirstParty":false,"canonicalSlug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ded1fe6a"}