{"uid":"cap_axIPO_-txYYEacZk46rWY","slug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-fad6f202","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/malformed-json-healer)","url":"https://shopify-spy.agentdiet.dev/v1/malformed-json-healer?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_TCi6glf-8XvzCn1j3-KyW","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 an LLM and it's broken — it has trailing commas and is wrapped in markdown fences. Can you repair it so I can use it in my pipeline? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output crashing agent pipeline","prompt":"My agent just got this JSON back from GPT-4 and it has a trailing comma and markdown fences around it — my code keeps crashing. Can you repair it? Here it is: ```{\"status\": \"ok\", \"items\": [\"a\", \"b\",]}```"},{"title":"Normalize single-quoted JSON from scraper","prompt":"I got this JSON-like string from a web scraper but it uses single quotes instead of double quotes and my parser won't accept it. Can you fix it to valid JSON? The string is: {'user': 'bob', 'score': 42}"},{"title":"Recover truncated JSON from partial LLM response","prompt":"The LLM response got cut off mid-JSON and now the object is incomplete — it's missing the closing brace and bracket. Can you repair this truncated JSON so I can extract the data from it? Here's what I have: {\"results\": [{\"id\": 1, \"name\": \"foo\""}],"resultDescription":"A repaired, valid JSON object parsed from the malformed input string, with issues such as trailing commas, markdown code fences, single quotes, and truncation corrected deterministically.","failureModes":["Input JSON too severely truncated to recover — returns error indicating unrecoverable structure","Input is not JSON-like at all (e.g. plain text) — may return error or empty result","Ambiguous structure due to deeply nested truncation — repaired output may not match original intent","Missing required raw_json parameter — returns 400 bad request"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsing due to common issues like trailing commas, markdown fences, single quotes, or truncation. Prefer it over manual regex fixes or custom parsers when you need a deterministic, reliable repair service that won't introduce non-determinism. Ideal for agent orchestration layers that need to safely deserialize LLM outputs before passing data downstream.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:29.819Z","isFirstParty":false,"canonicalSlug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d"}