{"uid":"cap_8FJxVJsPtyz3Owg5D5UUH","slug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-651a9ffa","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://llms-generator.agentdiet.dev/v1/structured-output)","url":"https://llms-generator.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_15VwZpuCzngE8P0ovNn4W","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"llms-generator.agentdiet.dev","brandSlug":"llms-generator-agentdiet-dev-mpp","brandBaseUrl":"https://llms-generator.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs deterministically so multi-agent pipelines can parse them without crashing.","exampleAgentPrompt":"This JSON came back from the LLM with trailing commas and markdown code fences and it won't parse — can you clean it up and give me valid JSON? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent pipeline keeps crashing because the LLM is outputting JSON with trailing commas and markdown fences. Can you repair this broken JSON so I can pass it to the next step? Here's the bad output: ```json {'user': 'bob', 'score': 95,} ```"},{"title":"Clean single-quoted JSON from model","prompt":"The language model returned this JSON using single quotes instead of double quotes and it's breaking my parser — can you fix it so it's valid JSON? Here's the string: {\"items\": ['apple', 'banana', 'cherry',]}"},{"title":"Recover truncated structured output","prompt":"My LLM call got cut off mid-response and I got a truncated JSON object that won't parse. Can you repair this partial JSON as best you can so I can extract the data? The broken string is: {\"report\": {\"title\": \"Q3 Results\", \"summary\": \"Revenue increased by 12"}],"resultDescription":"A repaired, valid JSON object that has had common LLM output defects corrected — including trailing commas, markdown code fences, single-quoted keys and values, and truncation artifacts — returned as a parseable JSON response body.","failureModes":["JSON too severely malformed or truncated to deterministically recover — returns error or best-effort partial result","raw_json parameter missing or empty — returns 400 validation error","Input is not JSON at all (e.g., plain prose) — may return error or unexpected output","Payment not provided — returns HTTP 402 requiring x402 USDC micropayment","Extremely large JSON strings may hit size limits"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline is receiving JSON outputs that fail to parse due to common model-induced defects like trailing commas, markdown fences, or single quotes, and you need a deterministic (non-AI) repair that is fast, cheap, and reliable for pipeline automation. Prefer this over prompting the LLM again (slower, costlier, non-deterministic) or writing custom parsers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:41.333Z","isFirstParty":false,"canonicalSlug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-76e2e18d"}