{"uid":"cap_owSMoEotnfAS4181tpx3B","slug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-ec4a0e57","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-validator)","url":"https://shopify-intel.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_mXSScXCvfyEwZzfPH7isT","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 truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash","exampleAgentPrompt":"This JSON from my LLM has trailing commas and markdown code fences — can you repair it so it's valid and parseable? Here's the raw string: ```json {\"name\": \"test\", \"value\": 42, } ```","exampleUseCases":[{"title":"LLM output JSON crash prevention","prompt":"My language model keeps returning JSON wrapped in markdown fences with trailing commas and my pipeline keeps crashing — can you fix this raw string so it's clean valid JSON? Here it is: ```json {\"result\": \"success\", \"data\": [1, 2, 3,] } ```"},{"title":"Multi-agent pipeline JSON sanitization","prompt":"Before I pass this JSON blob to the next agent in my workflow, I need you to repair it — it's got single quotes instead of double quotes and a truncated end: {'user': 'alice', 'score': 98"},{"title":"Recovering truncated LLM JSON response","prompt":"My LLM cut off mid-response and the JSON is truncated — can you deterministically repair this broken JSON so I can extract the data? Here's what I got: {\"items\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2"}],"resultDescription":"A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — returned as a parsed JSON response ready for downstream consumption.","failureModes":["JSON too severely malformed to recover — returns error indicating repair was not possible","Empty or null raw_json input — returns validation error for missing required field","Input is not JSON at all (e.g. plain text or binary) — repair attempt may fail or return unexpected structure","Network or service unavailability — returns HTTP error or timeout","Payment/402 failure if x402 credentials are not properly configured"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails parsing due to common formatting errors like trailing commas, markdown code fences, single quotes, or truncation. It is purpose-built for deterministic repair (not probabilistic LLM re-generation), making it reliable for production pipelines where consistency matters. Prefer this over asking an LLM to fix JSON when you need guaranteed, reproducible repair logic without additional token cost or hallucination risk.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:28.351Z","isFirstParty":false,"canonicalSlug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-991f500e"}