{"uid":"cap_d_7tPHWGXrs1qBcJRHFBK","slug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-2a5faf7b","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/llm-json-schema-healer)","url":"https://shopify-spy.agentdiet.dev/v1/llm-json-schema-healer?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_HSatIstIxBzkrCVjZV9AQ","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 from the LLM is broken — it has trailing commas and markdown code fences around it. Can you fix it so it's valid JSON I can parse? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My AI agent just returned this JSON but it's got trailing commas and wrapped in markdown backticks — can you clean it up so my pipeline doesn't crash? Here's the raw output: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3,],}```"},{"title":"Repair truncated API response JSON","prompt":"The LLM cut off partway through generating this JSON and now it's malformed — can you repair it and give me back valid JSON? The broken string is: {\"user\": \"bob\", \"scores\": [10, 20"},{"title":"Sanitize single-quoted JSON before database insert","prompt":"I've got JSON that was generated with single quotes instead of double quotes and it's failing to parse — fix it to proper JSON format for me: {'product': 'widget', 'price': 9.99, 'in_stock': true}"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of common LLM-introduced malformations including trailing commas, markdown code fences, single quotes, and truncation artifacts — ready for programmatic parsing without errors","failureModes":["JSON too severely truncated or corrupt to deterministically repair — returns error indicating unrecoverable input","Input string contains no parseable JSON structure at all — returns validation failure","Ambiguous structure where multiple valid repairs are possible — may return best-guess repair or error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated pipelines where reliability matters — especially when dealing with markdown-fenced responses, trailing commas, or single-quoted keys. Prefer this over manual parsing hacks or custom regex when operating in a multi-agent system that requires consistent, crash-free JSON handling.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:36:57.915Z","isFirstParty":false,"canonicalSlug":"shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-068a813d"}