{"uid":"cap_TkzdNtijZY9HcJJLJUC9q","slug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-99ffea62","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-repair)","url":"https://whale-momentum.agentdiet.dev/v1/json-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_43PtykETSgJYReL-DNr5M","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 from the LLM has trailing commas and markdown code fences and is breaking my pipeline — can you repair it and give me back valid JSON? Here's the raw output: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM output crashing pipeline","prompt":"The response from my language model keeps crashing my JSON parser because it wraps everything in markdown backticks and adds trailing commas — can you repair this raw string and return clean, valid JSON?"},{"title":"Recover truncated agent response","prompt":"My agent got cut off mid-response and the JSON is incomplete — it ends abruptly without closing brackets. Can you deterministically repair this truncated JSON so I can continue processing it?"},{"title":"Sanitize single-quoted JSON from scraper","prompt":"I got this JSON-like string from a web scraper but it uses single quotes instead of double quotes and the parser rejects it. Can you fix it to valid JSON so I can load it into my data pipeline?"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input. The response includes the corrected JSON with all syntax errors resolved — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed.","failureModes":["Input is so severely malformed that deterministic repair is ambiguous or impossible","Empty or whitespace-only raw_json input","Input is not JSON at all (e.g. plain text or binary data)","Extremely large payloads may time out","Schema validation failures if response schema is stricter than repaired output"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based guessing — ideal for multi-agent pipelines where consistency and predictability matter. Prefer it when dealing specifically with LLM output artifacts like markdown fences, trailing commas, or single quotes. Use it as a reliability layer between LLM calls and downstream JSON parsers to prevent pipeline crashes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:31:45.002Z","isFirstParty":false,"canonicalSlug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-f38852d9"}