{"uid":"cap_FWLLLo8sXKTNjwCKOAZL9","slug":"arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-feed9c29","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://arxiv-digest.agentdiet.dev/v1/schema-repair)","url":"https://arxiv-digest.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_5DqzLfUs6j3_e9SJHPMgg","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"arxiv-digest.agentdiet.dev","brandSlug":"arxiv-digest-agentdiet-dev-mpp","brandBaseUrl":"https://arxiv-digest.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":"The LLM just returned this broken JSON with trailing commas and markdown code fences — can you repair it so it's valid and parseable: ```json {\"name\": \"Alice\", \"age\": 30,} ```?","exampleUseCases":[{"title":"Fix LLM output before pipeline continues","prompt":"My language model returned this JSON but it has a trailing comma and it's wrapped in markdown fences — fix it so the next step in my pipeline doesn't crash: ```json {\"status\": \"ok\", \"result\": \"done\",} ```"},{"title":"Repair truncated agent response JSON","prompt":"The agent response got cut off mid-JSON and now it won't parse — here's the broken string: {\"items\": [{\"id\": 1, \"name\": \"foo\"}, can you repair it into valid JSON?"},{"title":"Normalize single-quoted JSON from model","prompt":"I got this JSON back from a model that used single quotes instead of double quotes: {'key': 'value', 'count': 42} — can you convert it to valid JSON so I can use it in my workflow?"}],"resultDescription":"Returns a repaired, valid JSON object that has been cleaned of common LLM output artifacts such as trailing commas, markdown code fences, single quotes instead of double quotes, and truncation issues — ready to parse and use downstream in agent pipelines.","failureModes":["JSON too severely corrupted to deterministically repair — returns error or best-effort partial output","Empty or null raw_json input — returns validation error","Input is already valid JSON — may return as-is or confirm validity","Non-JSON input passed (e.g. plain text) — may return error or attempt coercion"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common formatting issues like trailing commas, markdown fences, or single quotes, and you need a deterministic (non-AI) repair rather than asking another LLM to fix it. Especially useful in production pipelines where reliability and reproducibility matter more than flexibility.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:27.094Z","isFirstParty":false,"canonicalSlug":"arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-859b9028"}