{"uid":"cap_uT85NnljvvbwE36j28Ot8","slug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-f9d056b7","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-validator)","url":"https://alpha-stream.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_UVeBeVNcgAuOwD7xuN7u8","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 and it's broken — it has trailing commas, markdown fences, and single quotes — can you repair it so it parses cleanly: ```{'name': 'Alice', 'score': 42,}```?","exampleUseCases":[{"title":"LLM pipeline output sanitization","prompt":"The previous agent returned this JSON with markdown code fences and trailing commas and my pipeline crashed — can you fix it so I can pass it to the next step: ```json\n{\"name\": \"Bob\", \"age\": 30,}\n```?"},{"title":"Single-quote JSON normalization","prompt":"I got this JSON string back from a model that used single quotes instead of double quotes: {'status': 'ok', 'items': ['a', 'b']} — can you repair it into valid JSON?"},{"title":"Truncated JSON recovery","prompt":"My agent's response got cut off mid-output and the JSON is truncated and won't parse — here's what I have: {\"results\": [{\"id\": 1, \"val — can you deterministically repair it into something valid?"}],"resultDescription":"A JSON object containing the repaired, valid JSON structure derived from the malformed input, suitable for immediate use in downstream agent steps or pipelines.","failureModes":["Input is so corrupted it cannot be deterministically repaired — returns an error indicating repair was not possible","Input string is empty or whitespace — rejected by minLength:1 validation","Ambiguous structure where multiple valid repairs are possible — may return best-effort result or error","Network or payment (x402) authentication failure — 402 Payment Required if micropayment not included"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated or model-produced JSON that fails to parse due to common LLM artifacts like trailing commas, markdown fences, single quotes, or truncation. It is deterministic (not probabilistic), making it reliable for production pipelines where consistency matters. Prefer it over prompt-retrying the LLM (which costs more and is slower) or writing custom regex repair logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:39:54.308Z","isFirstParty":false,"canonicalSlug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-8a0f4dea"}