{"uid":"cap_fPrUGQU9fVFNGvRNq1sue","slug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-56d31b04","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://shopify-intel.agentdiet.dev/v1/json-fix)","url":"https://shopify-intel.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_TIjvhBsDlp0o_ruethoz_","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"shopify-intel.agentdiet.dev","brandSlug":"shopify-intel-agentdiet-dev-mpp","brandBaseUrl":"https://shopify-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, markdown fences) into valid JSON so multi-agent pipelines don't crash.","exampleAgentPrompt":"This LLM response came back as broken JSON with trailing commas and markdown fences — can you fix it so I can parse it? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fixing LLM output before downstream processing","prompt":"The language model returned JSON with a trailing comma and single quotes instead of double quotes — it's breaking my pipeline. Can you repair this raw string so it's valid JSON: {'user': 'bob', 'score': 42,}"},{"title":"Stripping markdown fences from agent responses","prompt":"My agent wrapped its JSON output in a markdown code block and now my parser is failing. Can you clean up this malformed string and give me proper JSON back: ```json\n{\"status\": \"ok\", \"count\": 5}\n```"},{"title":"Recovering truncated JSON from a token-limited response","prompt":"The model hit its token limit mid-response and I got a truncated JSON object that's missing its closing brackets. Can you repair this so it's valid: {\"items\": [{\"id\": 1, \"name\": \"widget\""}],"resultDescription":"A repaired, syntactically valid JSON object derived from the malformed input. The response contains the corrected JSON with issues like trailing commas, markdown fences, single quotes, and truncation resolved so it can be directly parsed by downstream systems.","failureModes":["Input JSON too severely malformed to repair deterministically — returns error or best-effort partial result","Empty or whitespace-only raw_json input — returns validation error","Input is not JSON at all (e.g. plain text or binary) — may return unparseable result or error","Payment/x402 authentication failure — returns 402 status","Extremely large inputs may hit size or timeout limits"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that is syntactically broken and needs deterministic, rule-based repair rather than AI-based rewriting. Ideal when you need fast, cheap, and predictable JSON fixing without nondeterminism — especially for trailing commas, markdown fences, and single-quote issues that are common LLM output artifacts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:49:56.163Z","isFirstParty":false,"canonicalSlug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-991f500e"}