{"uid":"cap_kY4ffkgQGKRw-QeGJUHM4","slug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-7e64a46f","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://polymarket-odds.agentdiet.dev/v1/schema-repair)","url":"https://polymarket-odds.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_1qmdtsW0VUOcK7Wnr_Zmt","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"polymarket-odds.agentdiet.dev","brandSlug":"polymarket-odds-agentdiet-dev-mpp","brandBaseUrl":"https://polymarket-odds.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) to prevent multi-agent pipeline crashes","exampleAgentPrompt":"This JSON string from the LLM is broken — it has trailing commas and markdown code fences — can you repair it so I can parse it cleanly: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before pipeline step","prompt":"The language model returned this mangled JSON with backticks and trailing commas, and my next pipeline step is failing — can you repair it so it parses correctly: ```{\"status\": \"ok\", \"score\": 0.95,}```"},{"title":"Sanitize agent chain JSON payload","prompt":"My agent chain is crashing because one node keeps outputting JSON with single quotes instead of double quotes — can you clean up this string and give me valid JSON: \"{'user': 'bob', 'action': 'buy'}\""},{"title":"Recover truncated streaming JSON","prompt":"The streaming response got cut off mid-way and the JSON is truncated — can you repair this partial JSON and fill in what's structurally needed to make it valid: {\"items\": [{\"id\": 1, \"name\": \"widget\""}],"resultDescription":"A JSON object containing the repaired, structurally valid JSON parsed from the malformed input string, suitable for direct programmatic use in downstream pipeline steps without further sanitization.","failureModes":["Input is so severely malformed it cannot be deterministically repaired — returns error indicating unrecoverable structure","Input string is empty or below minimum length — returns validation error","JSON is ambiguous enough that deterministic repair cannot produce a single confident output — may return partial result or error","Network timeout or service unavailability — returns HTTP 5xx","Payment not provided or insufficient — returns HTTP 402"],"whenToPreferThis":"Choose this endpoint when your agent pipeline receives LLM-generated JSON that may contain common syntax errors like trailing commas, markdown code fences, single quotes, or truncation, and you need a deterministic (not probabilistic) fix rather than asking the LLM to retry. Ideal for high-throughput multi-agent workflows where retrying the LLM is expensive or slow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T00:38:32.972Z","isFirstParty":false,"canonicalSlug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-7944936d"}