{"uid":"cap_wm0hQjjUNoJTAkleLBYWq","slug":"company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-a43f0ff3","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://company-enrich.agentdiet.dev/v1/json-fix)","url":"https://company-enrich.agentdiet.dev/v1/json-fix?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_B9ZenIa-TsF439w4RLAbR","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"company-enrich.agentdiet.dev","brandSlug":"company-enrich-agentdiet-dev-mpp","brandBaseUrl":"https://company-enrich.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 from our LLM output is broken — it has trailing commas and markdown fences wrapping it — can you repair it so it parses cleanly? Here it is: ```{\"name\": \"Acme\", \"revenue\": 5000000,}```","exampleUseCases":[{"title":"Fixing LLM pipeline JSON crashes","prompt":"Our agent pipeline keeps crashing because the LLM is outputting JSON with trailing commas and markdown code fences — can you repair this string so it's valid JSON? Here's the raw output: ```{\"company\": \"Globex\", \"employees\": 200,}```"},{"title":"Repairing truncated agent response","prompt":"The JSON response from our summarization agent got cut off mid-string and won't parse — can you fix this truncated JSON for me? It looks like: {\"title\": \"Q3 Report\", \"summary\": \"Revenue grew significantly in"},{"title":"Sanitizing single-quote JSON from legacy tool","prompt":"I'm getting JSON back from an older tool that uses single quotes instead of double quotes and it's breaking my downstream processing — can you repair this into valid JSON? Here's the bad string: {'product': 'Widget A', 'price': 9.99}"}],"resultDescription":"A repaired, valid JSON object that has had common LLM output defects corrected, including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncation resolved — ready to be parsed and consumed by downstream pipeline steps.","failureModes":["JSON is so severely malformed it cannot be deterministically repaired — returns error","Input string is not JSON at all (e.g. plain prose) — may return parsing error","Extremely long truncated JSON where closing structure is ambiguous — repair may be incomplete","Empty or whitespace-only input — returns validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM or external tool that fails standard JSON.parse() due to common LLM formatting artifacts like trailing commas, markdown code fences, single quotes, or truncation. It is a deterministic (non-AI) repair tool, making it reliable and predictable for automated pipelines where consistency matters. Prefer it over ad-hoc regex fixes or asking an LLM to re-parse, as it provides structured, repeatable correction without additional inference cost.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:51.734Z","isFirstParty":false,"canonicalSlug":"company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-7510e5c1"}