{"uid":"cap_BCtUE4llPnFzVQ_BkyF65","slug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-92fe9d31","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/schema-repair)","url":"https://llms-generator.agentdiet.dev/v1/schema-repair?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_4lUr7MVWEUUcMgQrjYPnl","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 truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.","exampleAgentPrompt":"This JSON string from the LLM has trailing commas and markdown code fences and it's crashing my pipeline — can you repair it so it's valid JSON I can actually use: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My AI agent just returned this malformed JSON with a trailing comma and it's breaking my downstream process — can you repair it so it parses cleanly: {\"status\": \"ok\", \"score\": 0.95,}"},{"title":"Strip markdown fences from JSON response","prompt":"The model wrapped its JSON output in triple-backtick markdown fences and now my code can't parse it — please fix this and give me clean valid JSON: ```json\n{\"result\": \"success\", \"items\": [1, 2, 3]}\n```"},{"title":"Repair single-quoted JSON from chatbot","prompt":"I got back some JSON using single quotes instead of double quotes from a chatbot response and it won't parse — can you convert it to valid JSON: {'user': 'bob', 'active': true}"}],"resultDescription":"Returns a repaired, valid JSON object with the original structure preserved but all malformations fixed — including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed.","failureModes":["Input is so severely malformed that structure cannot be inferred — returns error indicating unrecoverable JSON","Empty or null raw_json parameter — returns validation error","Input is not JSON-like at all (plain text, binary) — may return error or best-effort result","Extremely long truncated JSON where inferred closing structure may be incorrect"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated pipelines — specifically when dealing with trailing commas, markdown code fences, single quotes, or mild truncation. Prefer this over LLM-based JSON re-generation when you need speed, cost efficiency ($0.002/call), and reproducibility. Best suited for multi-agent orchestration scenarios where downstream steps require guaranteed-valid JSON.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:45.946Z","isFirstParty":false,"canonicalSlug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-76e2e18d"}