{"uid":"cap_153ja7RSN-HU_jN4zRTHY","slug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-956b1aee","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/schema-repair)","url":"https://workflows.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_JUfJ85mgYNcvxQ0K_3jq9","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 JSON outputs (trailing commas, markdown fences, single quotes) into valid JSON to prevent multi-agent pipeline crashes.","exampleAgentPrompt":"This JSON string from my LLM has trailing commas and markdown code fences and is crashing my pipeline — can you repair it into valid JSON? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fixing LLM pipeline JSON crashes","prompt":"My agent just returned this broken JSON with trailing commas and a markdown fence block and it's crashing my downstream parser — please repair it into valid JSON: ```json {\"status\": \"ok\", \"items\": [\"a\", \"b\",],} ```"},{"title":"Sanitizing single-quoted JSON from model output","prompt":"My language model keeps outputting JSON with single quotes instead of double quotes and it fails JSON.parse every time — can you fix this string into proper JSON: {'user': 'bob', 'score': 42}"},{"title":"Recovering truncated JSON from a long LLM response","prompt":"My LLM response got cut off mid-JSON and now the object is incomplete — here's the truncated string, can you repair it into the best valid JSON you can produce: {\"results\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2"}],"resultDescription":"Returns a repaired, valid JSON object derived from the malformed input, with common issues like trailing commas, markdown code fences, single quotes, and truncation resolved deterministically.","failureModes":["Input JSON too severely truncated to infer structure — returns error or best-effort partial object","Input is not JSON at all (plain text, binary) — may return error or empty object","Ambiguous structure where multiple valid repairs exist — deterministic repair picks one branch","Network or payment (x402) authentication failure — returns 402 or 5xx error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated multi-agent pipelines where reliability and consistency matter more than probabilistic reconstruction. Prefer it over manual parsing hacks or re-prompting the LLM when you need a fast, cheap, idempotent fix for common malformation patterns like trailing commas, markdown wrapping, and single quotes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:32.740Z","isFirstParty":false,"canonicalSlug":"workflows-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ded1fe6a"}