{"uid":"cap_FZk-7c0nOfoabiFPNfoaT","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-557cb55b","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/schema-repair)","url":"https://defi-yield.agentdiet.dev/v1/schema-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_cYcnfDEq4tjFtyJJ4AjrU","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 came back from the LLM wrapped in markdown fences and has trailing commas — can you clean it up and give me valid, parseable JSON? Here's the raw string: ```json {\"name\": \"Alice\", \"score\": 42,} ```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"The previous agent returned a JSON blob with single quotes and a trailing comma that's crashing my pipeline — please repair it into valid JSON: {'user': 'bob', 'active': true,}"},{"title":"Strip markdown fences from structured response","prompt":"My LLM returned its answer wrapped in triple-backtick markdown fences and I need clean JSON to pass to the next step — can you strip those and fix the JSON? Here it is: ```json\n{\"items\": [1, 2, 3]}\n```"},{"title":"Recover truncated JSON from token-limit cutoff","prompt":"The model hit its token limit mid-response and the JSON is truncated — something like {\"results\": [{\"id\": 1, \"name\": \"foo\" — can you deterministically repair that so it parses correctly?"}],"resultDescription":"A JSON object containing the repaired, schema-compliant version of the input string — with markdown fences stripped, trailing commas removed, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing without errors.","failureModes":["Input is so severely malformed that deterministic repair cannot reconstruct intent — returns error indicating unrecoverable JSON","Empty or whitespace-only raw_json input — returns validation error","Input is not JSON at all (e.g. plain prose) — repair may fail or return unexpected structure","Network timeout on the endpoint — agent should retry with idempotency key","Payment failure via x402 — 402 response requiring USDC payment on Base"],"whenToPreferThis":"Choose this endpoint when an LLM or agent in your pipeline has produced malformed, truncated, or markdown-wrapped JSON that needs deterministic repair before it can be parsed or passed downstream. Ideal for multi-agent orchestration systems where JSON parse errors would cause cascading failures. Prefer this over ad-hoc regex or prompt-based repair when you need reliable, consistent JSON sanitization without burning extra LLM tokens.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T01:17:11.797Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}