{"uid":"cap_lQfqll5NE_Hfqsh0Eq8Jl","slug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-60ecf11c","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-spy.agentdiet.dev/v1/json-validator)","url":"https://shopify-spy.agentdiet.dev/v1/json-validator?utm_source=zero.xyz","method":"POST","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_ytCV_el_t70ABCDtvL5VH","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-spy.agentdiet.dev","brandSlug":"shopify-spy-agentdiet-dev-mpp","brandBaseUrl":"https://shopify-spy.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, fences) so multi-agent pipelines never crash","exampleAgentPrompt":"This JSON came back from a language model and it's broken — it has trailing commas and markdown code fences around it. Can you repair it so I can parse it? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent just got this malformed JSON back from a language model step and the pipeline crashed — it has trailing commas and single quotes instead of double quotes. Can you repair it so I can continue processing? Raw string: {'name': 'Bob', 'score': 42,}"},{"title":"Strip markdown fences from agent output","prompt":"The model returned JSON wrapped in triple-backtick markdown fences and my parser can't handle it. Can you clean up this string and give me valid JSON back? Here it is: ```json\n{\"status\": \"ok\", \"count\": 5}\n```"},{"title":"Validate and repair truncated JSON","prompt":"I got a response that looks like the JSON was cut off mid-way — it ends abruptly without closing braces. Can you try to repair this truncated JSON string so it's parseable? Here's what I have: {\"user\": \"carol\", \"items\": [1, 2, 3"}],"resultDescription":"Returns a JSON object containing the repaired, syntactically valid JSON structure parsed from the malformed input. The agent receives a corrected and fully parseable JSON payload ready for downstream use in multi-agent pipelines.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error with description","Input is not JSON-like at all (e.g. plain text) — cannot repair","Truncation is too severe to infer missing structure — partial repair or failure returned","Empty or whitespace-only input — rejected with validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common syntax errors like trailing commas, markdown fences, single quotes, or truncation. It is deterministic (not probabilistic), making it reliable for production pipelines where consistent output is critical. Prefer this over writing custom regex-based repair logic or over re-prompting the LLM (which costs more tokens and time).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:30:45.248Z","isFirstParty":false,"canonicalSlug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d"}