{"uid":"cap_JSy99tzLdS3s52EtYbPis","slug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-94dd0977","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/llm-json-schema-healer)","url":"https://whale-momentum.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_zNUInllODKUGJVJ_Wjl_h","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 can process them without crashing.","exampleAgentPrompt":"This LLM response came back with broken JSON — it has trailing commas, single quotes, and markdown fences. Can you repair it into valid JSON? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"LLM pipeline JSON crash prevention","prompt":"My agent just returned this malformed JSON with trailing commas and markdown code fences and it's crashing my pipeline — can you fix it into valid JSON so I can continue processing? Here's the raw output: ```{\"user\": \"bob\", \"score\": 42,}```"},{"title":"Single-quote JSON normalization","prompt":"This LLM output used single quotes instead of double quotes and now my JSON parser is throwing errors. Can you repair this string into valid JSON: {'key': 'value', 'items': ['a', 'b']}"},{"title":"Truncated JSON recovery in agent swarm","prompt":"One of my sub-agents returned a truncated JSON response that cut off mid-string and now nothing downstream can read it. Please repair and complete this broken JSON so I can pass it to the next step: {\"report\": {\"title\": \"Q4 Summary\", \"findings\": [\"revenue up"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of common LLM output artifacts such as trailing commas, markdown code fences, single quotes instead of double quotes, and truncation issues — ready for downstream programmatic consumption.","failureModes":["JSON too severely truncated to deterministically repair — returns error","Input is not JSON-like at all and cannot be parsed or recovered","Ambiguous structure where multiple valid repairs are possible — may return best-guess result","Empty or whitespace-only input — returns validation error","Extremely large JSON strings may hit query parameter length limits via GET method"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or LLM-generated JSON that fails standard parsers. It is specifically designed for the artifacts LLMs commonly produce (markdown fences, trailing commas, single quotes) and uses deterministic repair logic rather than generative re-writing, making it reliable and auditable for production agent workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:32.830Z","isFirstParty":false,"canonicalSlug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-f38852d9"}