{"uid":"cap_YShUd_cu9ev5HEivl8vAu","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-dc4d4493","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":"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_NMo6fJF824H9MmszfpbFi","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 malformed, truncated, or markdown-wrapped LLM JSON outputs deterministically so multi-agent pipelines can continue without crashing.","exampleAgentPrompt":"This LLM response came back with malformed JSON — it has trailing commas, single quotes, and a markdown code fence wrapper. Can you clean it up and give me valid, parseable JSON?","exampleUseCases":[{"title":"Fix broken LLM pipeline output","prompt":"My agent just returned a JSON blob that has trailing commas and is wrapped in markdown backticks — it's crashing my downstream parser. Can you repair it so I get clean, valid JSON back?"},{"title":"Recover truncated structured output","prompt":"The model cut off mid-response and I've got a truncated JSON object missing its closing brackets. Can you deterministically repair this partial JSON so I can extract the fields I need?"},{"title":"Sanitize single-quoted JSON from LLM","prompt":"I got a JSON response from a language model that used single quotes instead of double quotes throughout. Can you fix it to standard valid JSON format so I can parse it normally?"}],"resultDescription":"A repaired, valid JSON object returned as a structured response. The output corrects issues such as trailing commas, markdown code fences, single-quoted keys or values, and truncation artifacts — producing parseable JSON that downstream agents and parsers can safely consume.","failureModes":["Input is so severely malformed it cannot be deterministically repaired — returns error","Input string is empty or whitespace-only — rejected by minLength:1 constraint","JSON is semantically ambiguous after repair (e.g. duplicate keys) — may return partial result","Network timeout or service unavailability — HTTP 5xx error","Payment not provided or invalid — HTTP 402 payment required"],"whenToPreferThis":"Choose this endpoint when a multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse() due to common LLM formatting errors like trailing commas, markdown fences, or single quotes. It is especially valuable in agentic workflows where structured outputs from one model feed into another agent's input schema. Prefer it over custom regex-based repair logic when you need deterministic, reliable correction without maintaining your own sanitization code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:35:19.039Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}