{"uid":"cap_Bvh8t87kap35nKZu52rcc","slug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ca7af8d8","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/structured-output)","url":"https://shopify-spy.agentdiet.dev/v1/structured-output?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_gjHrVGD0bI8fdx7AAFrQS","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 truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash","exampleAgentPrompt":"This JSON string came back from my LLM and it's broken — it has trailing commas, markdown code fences, and single quotes instead of double quotes. Can you repair it so it's valid JSON I can actually use?","exampleUseCases":[{"title":"Fixing LLM output in agentic pipeline","prompt":"My agent just returned this JSON but it's malformed — it starts with ```json and has trailing commas. Can you clean it up and give me back valid, parseable JSON?"},{"title":"Recovering truncated structured output","prompt":"The model cut off mid-response and now I have a truncated JSON object that won't parse. Can you repair it so the structure is intact and valid?"},{"title":"Sanitizing single-quoted JSON from chatbot","prompt":"I'm getting JSON back from a chatbot that uses single quotes instead of double quotes and has some extra commas. Can you fix it into proper JSON so I can feed it into my next step?"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed or truncated input, with markdown fences stripped, trailing commas removed, single quotes converted to double quotes, and any truncated structure completed where possible.","failureModes":["Input is so severely corrupted that deterministic repair is impossible — returns error","Input is not JSON-like at all (e.g. plain text or binary) — returns parse failure","Truncated JSON missing critical structural information cannot be fully recovered","Idempotency key collision with different payload may cause unexpected behavior"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than an LLM-based rewrite — it is ideal for high-throughput multi-agent pipelines where reliability and consistency matter, and where you cannot afford non-deterministic reformatting. Prefer it over prompting another LLM to fix the JSON, as it is faster, cheaper, and produces consistent results for common LLM output artifacts like markdown fences, trailing commas, and single quotes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T00:32:43.938Z","isFirstParty":false,"canonicalSlug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d"}