{"uid":"cap_XsfRDyjjCtaX25xRIv6B1","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e7126e1f","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://defi-yield.agentdiet.dev/v1/structured-output)","url":"https://defi-yield.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_KvjDM-wcYGltwef92Gms4","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"defi-yield.agentdiet.dev","brandSlug":"defi-yield-agentdiet-dev-mpp","brandBaseUrl":"https://defi-yield.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 it's breaking my pipeline — can you fix it: ```{\"name\": \"Alice\", \"score\": 42,}```?","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My language model returned this JSON with a trailing comma and single quotes and it's crashing my downstream agent — can you repair it: {'name': 'Bob', 'age': 30,}?"},{"title":"Stripping markdown fences from structured output","prompt":"The LLM wrapped its JSON response in a markdown code block and now my parser is failing — please fix this: ```json\n{\"result\": \"success\", \"value\": 99}\n```"},{"title":"Recovering truncated JSON response","prompt":"My model's response got cut off mid-JSON and now the object is incomplete — here's what I got: {\"items\": [\"apple\", \"banana\" — can you repair it so I can continue processing?"}],"resultDescription":"Returns a repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes replaced with double quotes, and truncated structures closed — ready for downstream agent consumption.","failureModes":["Input JSON is too severely corrupted or ambiguous to deterministically repair — returns error","Input string is not JSON-like at all — returns validation error","Truncation point is ambiguous, leading to uncertain repairs","Minlength violation if empty string is submitted — returns schema validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that contains common syntax errors like trailing commas, markdown code fences, single quotes, or truncation artifacts. It is deterministic (not probabilistic), making it reliable for production pipelines where consistency matters. Prefer it over general-purpose LLM re-prompting when you need fast, cheap, rule-based JSON cleanup without burning tokens.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:48:54.723Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}