{"uid":"cap_sSfimHoh4djOOP4CpMUdX","slug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-7a92c983","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://workflows.agentdiet.dev/v1/json-validator)","url":"https://workflows.agentdiet.dev/v1/json-validator?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_zwhoPf1x4r_R6cvtpkh8B","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"workflows.agentdiet.dev","brandSlug":"workflows-agentdiet-dev-mpp","brandBaseUrl":"https://workflows.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines can safely parse outputs","exampleAgentPrompt":"This JSON string from the LLM has trailing commas and markdown code fences and won't parse — can you repair it so I get back valid, clean JSON? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"LLM output repair in agent pipeline","prompt":"The JSON my LLM just returned has a trailing comma and is wrapped in markdown fences — it's crashing my parser. Can you fix this and give me clean, parseable JSON? Here's the raw output: ```json {\"status\": \"ok\", \"items\": [1, 2, 3,],} ```"},{"title":"Single-quote JSON normalization","prompt":"I got a JSON blob back from an AI that used single quotes instead of double quotes and now my code won't accept it. Can you repair this string into valid JSON: {'user': 'bob', 'score': 42}?"},{"title":"Truncated JSON recovery before downstream agent","prompt":"My summarization agent returned a JSON response that got cut off mid-object — it ends abruptly without closing brackets. Please repair this truncated JSON so I can pass it to the next step: {\"title\": \"Q3 Report\", \"summary\": \"Revenue grew significantly in"}],"resultDescription":"A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures closed — ready for safe parsing by downstream agents or applications.","failureModes":["JSON is too severely malformed to deterministically repair — returns error indicating unrecoverable input","Input string is empty — rejected by minLength:1 schema validation","JSON structure is ambiguous after truncation — repair may produce semantically incorrect but syntactically valid output","Network timeout or service unavailability returns HTTP error","Extremely large JSON strings may hit query parameter length limits due to GET method"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsing due to common syntax issues like trailing commas, markdown code fences, or single quotes. It is particularly valuable as a deterministic middleware layer between LLM output and downstream structured data consumers, where unpredictable formatting would otherwise cause pipeline crashes. Prefer this over writing custom regex fixers or prompting the LLM to retry, as it provides fast, consistent repair without additional token cost.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:20.933Z","isFirstParty":false,"canonicalSlug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ded1fe6a"}