{"uid":"cap__sj7D12m4Xzk-ZAwKzxel","slug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-0049aa31","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":"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_a5UIwmQCmteEwzHuwDPFW","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 JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash","exampleAgentPrompt":"This JSON from my LLM has trailing commas and markdown code fences and won't parse — can you repair it into valid JSON: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix crashing multi-agent pipeline","prompt":"My agent pipeline keeps crashing because the LLM step is outputting JSON with trailing commas and single quotes instead of double quotes. Can you repair this string so it's valid JSON: {'user': 'bob', 'score': 42,}"},{"title":"Strip markdown fences from LLM output","prompt":"The model wrapped its JSON response in triple-backtick markdown fences and now my downstream tool can't parse it. Fix this for me: ```json\n{\"status\": \"ok\", \"count\": 5}\n```"},{"title":"Recover truncated LLM JSON response","prompt":"My LLM got cut off mid-response and returned incomplete JSON like {\"items\": [{\"id\": 1, \"name\": \"foo\" — can you repair that truncated string into valid parseable JSON?"}],"resultDescription":"A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncations resolved — ready for downstream parsing in a multi-agent pipeline.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error indicating unrecoverable JSON","Empty raw_json parameter — returns validation error","Input that is not JSON at all (e.g. plain text) — may return an error or best-effort partial repair","Very large JSON strings may exceed query parameter length limits"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline is receiving syntactically broken JSON that needs deterministic, rule-based repair rather than AI-based rewriting. Ideal for fixing common LLM output artifacts like trailing commas, markdown code fences, and single-quoted strings before passing data to strict JSON parsers or downstream agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:48.312Z","isFirstParty":false,"canonicalSlug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-7944936d"}