{"uid":"cap_Z50ulwS8_dLAvXWmNa3Yb","slug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-972732f3","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/schema-repair)","url":"https://whale-momentum.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_wlwyHoiL-Ky5J8fWVZ4-e","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 LLM response came back with broken JSON — it has trailing commas, single quotes instead of double quotes, and markdown code fences wrapping it. Can you repair it so I can parse it properly? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"LLM output cleanup in agent pipeline","prompt":"My AI agent just returned this JSON with trailing commas and markdown fences around it and it's crashing my parser — can you fix it? Here's the raw output: ```json\n{\"items\": [\"apple\", \"banana\",],\n\"count\": 2,}```"},{"title":"Single-quote JSON from chatbot response","prompt":"I got a response from a chatbot that used single quotes instead of double quotes and now my pipeline is broken. Please repair this JSON so it's valid: {'user': 'Bob', 'score': 95, 'active': True}"},{"title":"Truncated JSON recovery before downstream tool","prompt":"My orchestrator received a truncated JSON string that got cut off mid-object — it's missing closing brackets and has a syntax error. Can you deterministically repair it before I pass it to the next agent step? Here it is: {\"results\": [{\"id\": 1, \"value\": \"foo\""}],"resultDescription":"A JSON object containing the repaired, valid JSON structure parsed from the malformed input, ready for downstream consumption without syntax errors.","failureModes":["Input string is so severely truncated that deterministic repair is impossible — returns error indicating unrecoverable JSON","Input is not JSON at all (e.g. plain prose or binary data) — repair cannot be applied","Ambiguous structure where multiple valid repairs exist — may return best-guess result or error","Empty raw_json string — returns validation error due to minLength:1 constraint"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that may contain common syntax errors like trailing commas, markdown code fences, or single quotes, and you need a deterministic (not probabilistic) fix before passing data downstream. It is especially valuable in automated orchestration flows where a crashed JSON parser would halt the entire pipeline. Prefer it over prompt-based re-asking when latency or token cost matters, or when the source LLM is unavailable for retry.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-28T00:43:25.921Z","isFirstParty":false,"canonicalSlug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-f38852d9"}