{"uid":"cap_R9gn1QigUommH88e_D2sj","slug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-b77eb21c","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://whale-momentum.agentdiet.dev/v1/json-fix)","url":"https://whale-momentum.agentdiet.dev/v1/json-fix?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_gGKukFU3sf-fDg6bXW5so","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"whale-momentum.agentdiet.dev","brandSlug":"whale-momentum-agentdiet-dev-mpp","brandBaseUrl":"https://whale-momentum.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 my LLM and it's broken — it has trailing commas, single quotes around keys, and a markdown code fence wrapper. Can you fix it so it's valid JSON I can actually parse?","exampleUseCases":[{"title":"Fix crashed agent pipeline JSON","prompt":"My agent pipeline just crashed because the LLM returned malformed JSON with trailing commas and an unclosed bracket. Can you repair this so I can continue processing: {\"name\": 'Alice', \"score\": 42,}"},{"title":"Strip markdown fences from LLM response","prompt":"The model wrapped its JSON output in triple backtick markdown fences again and now my parser is failing. Can you clean it up and give me valid JSON? Here's the raw output: ```json\n{\"result\": \"ok\", \"count\": 5,}\n```"},{"title":"Sanitize single-quoted JSON for downstream API","prompt":"I'm getting JSON from an older LLM that uses single quotes instead of double quotes, and my downstream API won't accept it. Can you convert this to proper valid JSON: {'user': 'bob', 'active': true, 'score': 99}"}],"resultDescription":"A JSON object containing the repaired, valid JSON — free of trailing commas, markdown fences, single quotes, and truncation artifacts — ready for downstream parsing and processing.","failureModes":["JSON too severely truncated or corrupted to deterministically repair","Input is not recognizably JSON-like at all (plain text, binary data)","Ambiguous repair paths where multiple valid completions exist","Empty or whitespace-only input string"],"whenToPreferThis":"Choose this endpoint when an LLM or agent in your pipeline is producing malformed JSON that breaks downstream parsers — especially when the errors are predictable patterns like trailing commas, markdown code fences, single-quoted keys, or mild truncation. It is a deterministic (not generative) repair tool, making it reliable for production pipelines where consistency matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:51:29.867Z","isFirstParty":false,"canonicalSlug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-f38852d9"}