{"uid":"cap_yrFqYzGHgNaXYzRscXhUl","slug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-66acc7d9","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-normalizer)","url":"https://shopify-intel.agentdiet.dev/v1/json-normalizer?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_3XvAZqlCdPWS4orC0JnJT","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-generated JSON (trailing commas, markdown fences, single quotes) to prevent multi-agent pipeline crashes","exampleAgentPrompt":"The LLM just returned this broken JSON with trailing commas and markdown fences — can you run it through the JSON normalizer to fix it so our pipeline doesn't crash: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before database write","prompt":"Our language model returned JSON with single quotes and a trailing comma and now our database insert is failing — can you repair this string for me: \"{'user': 'bob', 'score': 42,}\""},{"title":"Strip markdown fences from agent response","prompt":"The agent wrapped its JSON response in triple backtick markdown fences and now my parser is throwing an error — please clean up this output: \"```json\n{\"status\": \"ok\", \"items\": [1,2,3]}\n```\""},{"title":"Recover truncated JSON mid-pipeline","prompt":"A downstream model returned a truncated JSON object that cuts off mid-string — run it through the JSON repair tool and give me back something parseable: \"{\\\"order_id\\\": \\\"abc123\\\", \\\"items\\\": [\\\"widget\\\",\""}],"resultDescription":"A repaired, well-formed JSON object that can be parsed by standard JSON parsers, with all common LLM formatting errors corrected including trailing commas removed, markdown code fences stripped, single quotes converted to double quotes, and truncated structures closed","failureModes":["Input is so severely corrupted that repair is not deterministically possible — returns error with details","Input JSON is entirely empty or whitespace — returns validation error","Extremely long inputs may hit query string length limits since raw_json is passed as a GET query parameter","Ambiguous structures where intent cannot be inferred deterministically may produce unexpected output"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based guessing — especially in automated multi-agent pipelines where predictable, reproducible output is critical. Prefer it over ad-hoc string manipulation when handling LLM-generated JSON with common formatting issues like trailing commas, markdown fences, or single quotes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:45.705Z","isFirstParty":false,"canonicalSlug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-991f500e"}