{"uid":"cap_D5QQ0z18f-CI-17mBdOXL","slug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-da9f7186","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/schema-repair)","url":"https://alpha-stream.agentdiet.dev/v1/schema-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_iA3Aty-zHccz1QebF09qb","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 came back from the LLM with trailing commas and markdown code fences and it's breaking my pipeline — can you clean it up and give me valid parseable JSON? Here's the raw output: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The language model just returned this JSON with trailing commas and it's crashing my downstream parser — clean it up so I can continue: {\"items\": [\"apple\", \"banana\",], \"count\": 2,}"},{"title":"Strip markdown fences from JSON response","prompt":"My LLM wrapped its JSON response in triple backtick code fences and now my JSON parser is failing — strip the fences and fix any other issues so I get clean parseable JSON back."},{"title":"Repair single-quoted JSON from agent output","prompt":"This agent output used single quotes instead of double quotes throughout the JSON object and it won't parse — can you convert it to valid JSON? Here it is: {'user': 'bob', 'active': true, 'score': 99}"}],"resultDescription":"Returns a JSON object containing the repaired, syntactically valid version of the malformed input JSON, suitable for direct use in downstream parsing or pipeline steps","failureModes":["Input is so severely malformed that deterministic repair cannot reconstruct intent — returns error or best-effort partial result","Input string is not JSON-like at all (e.g. plain text, binary) — returns validation error","Empty or missing raw_json field — returns 422 validation error","Truncation is too severe for context recovery — ambiguous repair result returned with warning"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based rewriting — ideal for multi-agent pipelines where reproducibility matters, latency is critical, and you cannot afford to re-prompt the upstream model. Best for common LLM JSON failure modes: trailing commas, markdown code fences, single quotes, and minor truncation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:40:29.260Z","isFirstParty":false,"canonicalSlug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-8a0f4dea"}