{"uid":"cap_kj_RLJDy4q6ndEF45NHzj","slug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e8d8c0d6","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":"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_pQKXyy1OwxSbqCRXsTPFD","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-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines can reliably process structured outputs.","exampleAgentPrompt":"This JSON from the LLM response is broken — it has trailing commas and markdown code fences around it — can you repair it so I can use it downstream: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"The language model returned this garbled JSON with trailing commas and it's breaking my pipeline — can you repair it so I can pass it to the next agent: '{name: \"Bob\", score: 42,}'"},{"title":"Strip markdown fences from agent output","prompt":"My agent wrapped its JSON response in triple backticks and now my parser is failing — please clean up this output and give me valid JSON: ```json {\"status\": \"ok\", \"items\": [1, 2, 3],} ```"},{"title":"Recover truncated structured output","prompt":"The model got cut off mid-response and I have a truncated JSON string like '{\"user\":\"carol\",\"results\":[{\"id\":1' — can you repair and close it so it's valid JSON I can work with?"}],"resultDescription":"Returns a repaired, valid JSON object with malformed syntax corrected — trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures closed where possible — ready for downstream parsing.","failureModes":["Input is so severely truncated that repair is ambiguous or impossible, returning an error or best-guess output","Input is not JSON-like at all (plain text, binary), causing repair to fail","Deeply nested or very large JSON strings may hit query parameter length limits via GET method","Repaired output may not match original schema intent if truncation removed critical keys"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse due to common LLM formatting errors (trailing commas, markdown code fences, single quotes, minor truncation). Ideal for deterministic, rule-based repair rather than AI-based reinterpretation of intent. Best suited for single JSON repair calls in real-time pipeline contexts rather than batch validation workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:41:56.060Z","isFirstParty":false,"canonicalSlug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d"}