{"uid":"cap_s6OqjB6iuEQq2-claSzZ9","slug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-2695d110","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/json-validator)","url":"https://polymarket-odds.agentdiet.dev/v1/json-validator?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_14-QNNh4vvShQL8aJnlfu","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 on bad JSON.","exampleAgentPrompt":"This JSON string from the LLM is broken — it has trailing commas and markdown fences around it — can you repair it so I can pass it to the next step in my pipeline: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fix LLM output before database write","prompt":"The model returned this JSON but it has trailing commas and single quotes instead of double quotes — fix it before I write it to the database: {'user': 'bob', 'score': 42,}"},{"title":"Repair truncated agent response mid-pipeline","prompt":"My agent pipeline just got back a truncated JSON response that cuts off mid-object and won't parse — can you repair it and return a valid JSON object? Here it is: {\"items\": [{\"id\": 1, \"name\": \"foo\""},{"title":"Strip markdown fences from code-block JSON","prompt":"The LLM wrapped its JSON output in a markdown code block with triple backticks and I need clean parseable JSON — can you strip the fences and fix any other issues in this string: ```json\n{\"status\": \"ok\", \"data\": [1, 2, 3],}\n```?"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of common LLM-introduced errors such as trailing commas, markdown fences, single quotes, and truncation artifacts, ready for downstream parsing and processing.","failureModes":["JSON too severely malformed to deterministically repair — returns error indicating unrecoverable structure","Empty or whitespace-only input returns validation error","Input exceeds size limits — large payloads may be rejected","Non-JSON input (e.g. plain text) may return unrecoverable error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that fails to parse due to common formatting errors like trailing commas, markdown code fences, single quotes, or truncation. It is deterministic (not probabilistic), making it reliable for automated pipelines where consistency matters. Prefer it over manual regex fixes or custom parsers when you need a drop-in repair step with idempotency support via Idempotency-Key headers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:43:51.781Z","isFirstParty":false,"canonicalSlug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-7944936d"}