{"uid":"cap_ZBuIAasACCa2Rh_6uiEfH","slug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-b137054b","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":"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_EhQm87ClMG4I7Req6AMcJ","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 malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.","exampleAgentPrompt":"This LLM response came back as broken JSON with trailing commas and markdown fences — can you repair it so I can parse it: ```{\"name\": \"Alice\", \"score\": 42,}```?","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent just returned this mangled JSON with trailing commas and it's crashing my pipeline — please repair it so it's valid: `{\"status\": \"ok\", \"items\": [1, 2, 3,],}`"},{"title":"Strip markdown fences from agent output","prompt":"The LLM wrapped its output in triple-backtick markdown fences and added single quotes instead of double quotes — can you clean it up and give me valid JSON? Here it is: ```{'user': 'bob', 'active': true}```"},{"title":"Recover truncated JSON response","prompt":"My model got cut off mid-response and I ended up with truncated JSON — something like `{\"results\": [{\"id\": 1, \"name\": \"foo\"` — can you deterministically repair it so I can use it?"}],"resultDescription":"A repaired, valid JSON object that has been sanitized of common LLM output artifacts including trailing commas, markdown fences, single-quote delimiters, and truncation errors — ready to be parsed by downstream pipeline steps.","failureModes":["Input JSON is so severely malformed that deterministic repair is impossible — returns error indicating unrecoverable structure","Empty or whitespace-only raw_json input — returns validation error","Input exceeds character or size limits — returns rejection error","Ambiguous structure where multiple repair interpretations exist — may return best-guess result with lower confidence"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline frequently receives malformed JSON from language model outputs — especially outputs with trailing commas, markdown code fences, single-quote delimiters, or truncation artifacts. It is preferable over generic JSON parsers when you need deterministic, rule-based repair rather than probabilistic inference, and when pipeline reliability (no crashes) is the primary concern.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:46.335Z","isFirstParty":false,"canonicalSlug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-f38852d9"}