{"uid":"cap_6yDDyKAxrYZPHLNEy1VjF","slug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-ad00ffe3","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://alpha-stream.agentdiet.dev/v1/json-repair)","url":"https://alpha-stream.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_v7TDbNPPglFmp5tfZx9Po","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"alpha-stream.agentdiet.dev","brandSlug":"alpha-stream-agentdiet-dev-mpp","brandBaseUrl":"https://alpha-stream.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 string from the LLM is broken — it has trailing commas and markdown fences wrapping it — can you repair it so it's valid JSON I can actually use: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before database write","prompt":"The LLM just returned this JSON but it's wrapped in markdown code fences and has a trailing comma — repair it before I save it to the database: ```{\"user_id\": \"abc123\", \"score\": 0.87,}```"},{"title":"Unblock crashed multi-agent pipeline","prompt":"My agent pipeline keeps crashing because the upstream model returns truncated JSON — can you fix this broken output so the next step can parse it: {\"items\": [{\"id\": 1, \"name\": \"Widget\""},{"title":"Sanitize single-quoted JSON from prompt response","prompt":"I got this JSON back from a prompt that used single quotes instead of double quotes — fix it to proper JSON: {'product': 'laptop', 'price': 999, 'in_stock': true}"}],"resultDescription":"A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready to be parsed by any standard JSON parser.","failureModes":["Input is so severely malformed that deterministic repair cannot infer intent — returns error indicating unrecoverable JSON","Input is empty or whitespace-only — returns validation error on raw_json field","Input is already valid JSON — returns it unchanged (no-op)","Network timeout or service unavailability — standard HTTP 5xx error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that fails to parse due to common LLM formatting issues like trailing commas, markdown fences, single quotes, or truncation. Prefer this over manual regex-based fixes when you need deterministic, reliable repair across all common LLM JSON failure modes in an automated pipeline context.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:34:39.059Z","isFirstParty":false,"canonicalSlug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-8a0f4dea"}