{"uid":"cap_cwERLGrrbl8onc8HC3Ukd","slug":"company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-89ff2652","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/structured-output)","url":"https://company-enrich.agentdiet.dev/v1/structured-output?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_ChdLbjq31Wrxaegyf158a","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 came back from the LLM with trailing commas and markdown fences and it's breaking my pipeline — can you repair it so it's valid JSON I can parse? Here's the raw string: ```{\"name\": \"Acme\", \"founded\": 2020,}```","exampleUseCases":[{"title":"LLM output repair in agent pipeline","prompt":"The structured output from my last LLM call has trailing commas and won't parse — can you fix this broken JSON for me: `{\"company\": \"Acme\", \"revenue\": 5000000,}` so my next agent step doesn't crash?"},{"title":"Stripping markdown fences from AI response","prompt":"My AI returned JSON wrapped in triple-backtick markdown fences and my parser is choking on it. Can you clean up this string and give me back valid JSON: ```json\n{\"status\": \"active\", \"score\": 0.87}\n```?"},{"title":"Fixing single-quoted JSON from legacy agent","prompt":"I'm getting single-quoted JSON from an older agent node that looks like {'name': 'OpenAI', 'founded': 2015} — can you convert it to proper double-quoted valid JSON so I can pass it downstream?"}],"resultDescription":"A repaired, syntactically valid JSON object derived from the malformed input, with issues like trailing commas, markdown code fences, single quotes, and truncation corrected deterministically.","failureModes":["Input is so severely malformed that repair is impossible — returns error or empty object","Truncated JSON missing critical closing brackets that cannot be inferred","Input is not JSON at all (e.g. plain text) — may return error","Very large JSON strings may hit query parameter length limits since raw_json is passed as a GET query parameter"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline produces structured output that is nearly-valid JSON but has common syntax issues like trailing commas, markdown code fences, single quotes, or mild truncation. It is especially useful as a pre-processing step before JSON parsing in automated pipelines where LLM outputs are unpredictable. Prefer this over writing custom repair logic when you need a fast, deterministic, pay-per-call solution without deploying your own infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:18.218Z","isFirstParty":false,"canonicalSlug":"company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-7510e5c1"}