{"uid":"cap_IB3kt5-Eeetd9K9VdguTd","slug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-1dd084d3","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-repair)","url":"https://shopify-intel.agentdiet.dev/v1/json-repair?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_JSHICulfLqi87gPYnprFt","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 string from the LLM output has trailing commas and markdown code fences and is crashing my pipeline — can you repair it and give me back a clean, valid JSON object? Here's the raw string: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"LLM pipeline JSON crash recovery","prompt":"My language model just returned this malformed JSON with trailing commas and it's breaking my downstream agent — can you fix it so I can keep the pipeline running? Raw output: {\"status\": \"ok\", \"items\": [\"a\", \"b\",], }"},{"title":"Markdown fence stripping for agent handoff","prompt":"The model wrapped its response in triple-backtick markdown fences and now my agent can't parse it — can you strip the fences and repair any issues so I get a clean JSON object back?"},{"title":"Single-quote JSON normalization","prompt":"I got a JSON response that uses single quotes instead of double quotes and it's failing validation — can you convert it to proper JSON? Here it is: {'user': 'bob', 'active': true}"}],"resultDescription":"A repaired, valid JSON object returned as a structured response. The endpoint deterministically corrects common LLM output defects including trailing commas, markdown code fences, single-quoted keys/values, and truncation issues, returning a clean, parseable JSON payload.","failureModes":["Input JSON is so severely malformed it cannot be deterministically repaired — returns error indicating unrecoverable input","Empty or missing raw_json field — returns 400 validation error","Input exceeds maximum payload size limits — returns size-related error","Payment not completed via x402 — returns HTTP 402 with payment required details"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM or external agent that is malformed, truncated, or wrapped in markdown, and you need a deterministic (non-AI) fix rather than another LLM pass. Ideal for production pipelines where reliability and cost predictability matter — at $0.002/call it is cheaper than re-invoking an LLM. Prefer this over manual parsing or regex hacks when you encounter trailing commas, single quotes, or markdown fences consistently in LLM outputs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:32:46.209Z","isFirstParty":false,"canonicalSlug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-991f500e"}