{"uid":"cap_oSr2AjmPi-rL_zmCklvAT","slug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d","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/repair)","url":"https://shopify-spy.agentdiet.dev/v1/repair?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__KmB4hTU9mk5Xv8SVHdrt","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 JSON strings (trailing commas, single quotes, fences) into valid JSON so multi-agent pipelines don't crash.","exampleAgentPrompt":"This JSON from the LLM has trailing commas and is wrapped in markdown fences — can you run it through the JSON repair service and give me the clean, valid version? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crashes","prompt":"The language model just returned this broken JSON with a trailing comma and markdown code block wrapper — repair it so my downstream agent can parse it: ```json {\"result\": \"ok\", \"score\": 0.95,} ```"},{"title":"Sanitize single-quoted JSON from agent","prompt":"My agent returned JSON using single quotes instead of double quotes: {'user': 'bob', 'status': 'active'} — can you fix it into proper JSON so I can feed it into the next step?"},{"title":"Recover truncated JSON response","prompt":"The API call got cut off mid-response and I'm left with this incomplete JSON: {\"items\": [{\"id\": 1, \"name\": \"widget\"} — can you repair and close it so it's valid?"}],"resultDescription":"A JSON object containing the repaired, valid JSON output. The response restores structural correctness by fixing issues like trailing commas, unclosed brackets, markdown code fences, and single-quoted keys or values.","failureModes":["Input is so severely malformed that deterministic repair cannot infer intent — returns error or best-effort partial result","Input is not JSON at all (e.g. plain text or binary) — likely returns an error","Very large JSON strings may hit query parameter size limits via GET method","Ambiguous truncation points may result in incorrect structural completion"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, deterministic (non-LLM) JSON repair step in an automated pipeline — especially when LLM outputs frequently contain markdown fences, trailing commas, or single quotes. Prefer this over writing custom parsing logic or using another LLM call to fix JSON, as it is fast, cheap ($0.002/call), and idempotent.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:44.529Z","isFirstParty":false,"canonicalSlug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d"}