{"uid":"cap_fWvaqDtrpknbI0vbk9ZHT","slug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-bbf5541c","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/repair)","url":"https://shopify-intel.agentdiet.dev/v1/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_ZyhAFiY80qxXpesz1pCVO","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 from my LLM has trailing commas and markdown fences and keeps crashing my pipeline — can you repair it so it's valid? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"My LLM just returned this JSON with a trailing comma and single quotes and it's breaking my next pipeline step — can you repair it into valid JSON? Here's the string: {'name': 'Bob', 'score': 42,}"},{"title":"Strip markdown fences from agent response","prompt":"I got a response from my coding agent wrapped in triple-backtick markdown fences and it's not parseable as JSON — can you clean it up and give me just the valid JSON object?"},{"title":"Recover truncated JSON from crashed generation","prompt":"My LLM truncated mid-output and I have an incomplete JSON string ending abruptly — can you try to repair and complete it so my pipeline doesn't crash? Here's what I got: {\"items\": [{\"id\": 1, \"val\": \"foo\"}, {\"id\": 2"}],"resultDescription":"A JSON object containing the repaired, valid JSON output. The malformed, truncated, or markdown-wrapped input string is returned as a properly parsed and schema-valid JSON value that downstream agents or systems can safely consume.","failureModes":["Input JSON too severely truncated or corrupted to deterministically repair — returns error or best-effort partial result","Non-JSON input string provided — may return error indicating input is not repairable as JSON","Payment not included or invalid — returns HTTP 402 requiring x402 USDC payment","Network timeout or service unavailability — returns 5xx error"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline produces JSON that is syntactically broken — trailing commas, single quotes, markdown code fences, or truncation — and you need a deterministic (not generative) repair that won't hallucinate new content. Prefer this over writing custom regex parsers or using a general-purpose LLM to reformat JSON, as it is purpose-built, cheap ($0.002/call), and supports idempotent retries via Idempotency-Key header.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:30:26.232Z","isFirstParty":false,"canonicalSlug":"shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-991f500e"}