{"uid":"cap_YrzcynoPvvhhBLVC126rv","slug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-4f4f70c9","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-repair)","url":"https://polymarket-odds.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_nNIco7md1urWVH7rHNAea","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 LLM response came back with broken JSON — it has trailing commas, markdown code fences, and single quotes — can you repair it so I can parse it properly: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"LLM pipeline JSON crash recovery","prompt":"My language model just returned this malformed JSON with trailing commas and markdown fences and it's crashing my pipeline — can you fix it and give me back clean parseable JSON? Here's the raw output: ```json\n{\"results\": [\"foo\", \"bar\",],\n\"count\": 2\n}```"},{"title":"Multi-agent JSON handoff sanitization","prompt":"Before passing this JSON payload from one agent to the next, I need to make sure it's valid — it came back with single quotes instead of double quotes and an unterminated string. Can you repair it? The raw string is: {'status': 'ok', 'data': 'incomplete..."},{"title":"Automated LLM output validation in CI","prompt":"I'm getting inconsistent JSON back from my fine-tuned model during testing — some responses have extra commas, some have unescaped characters. Can you run this raw output through JSON repair so I can confirm it parses cleanly: {\"score\": 0.95, \"label\": \"positive\",}"}],"resultDescription":"A JSON object containing the repaired, valid JSON data parsed from the originally malformed input string, ready for downstream consumption without further sanitization.","failureModes":["Input is so severely malformed it cannot be deterministically repaired — returns error or best-effort partial result","Empty or whitespace-only raw_json input fails validation (minLength:1)","Input that is not JSON at all (e.g. plain prose) may produce unpredictable repair output","Payment or x402 authentication failure results in 402 response before processing"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails standard parsing due to common LLM artifacts like trailing commas, markdown code fences, single quotes, or truncated strings, and you need a deterministic (non-generative) fix rather than asking another LLM to rewrite the output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:36:53.371Z","isFirstParty":false,"canonicalSlug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-7944936d"}