{"uid":"cap_Ki9pEMT15zj_EQnOzGFIA","slug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-76e2e18d","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/repair)","url":"https://llms-generator.agentdiet.dev/v1/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_CAMh1tKU-4497u0eRVjdB","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 JSON strings from LLM outputs so multi-agent pipelines can continue without crashing.","exampleAgentPrompt":"This LLM response came back with broken JSON — it has trailing commas, single quotes, and is wrapped in markdown fences. Can you repair it into valid JSON? Here it is: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My LLM just returned this malformed JSON with trailing commas and markdown code fences and I need to parse it downstream — can you repair it into valid JSON? Here's what came back: ```json\n{\"name\": \"Bob\", \"score\": 42,}\n```"},{"title":"Recover truncated JSON response","prompt":"The model's output got cut off mid-JSON and the result is unparseable. Can you try to deterministically repair this truncated string so I can extract the data: {\"items\": [{\"id\": 1, \"value\": \"foo\"},"},{"title":"Sanitize single-quoted JSON before storage","prompt":"I have a JSON blob that uses single quotes instead of double quotes and I need it to be valid before I store it — can you fix it? Here it is: {'user': 'alice', 'role': 'admin', 'active': true}"}],"resultDescription":"A repaired, valid JSON object derived from the malformed input. The response contains the corrected JSON with issues like trailing commas, markdown fences, single quotes, and truncation resolved deterministically.","failureModes":["Input JSON is so severely malformed or truncated that repair is impossible — returns an error or empty object","Input string is not JSON at all (e.g. plain text) — may return an error","Very large or deeply nested inputs may exceed processing limits","Network timeout or service unavailability returns HTTP 5xx"],"whenToPreferThis":"Choose this endpoint when an LLM or agent has produced JSON output that fails to parse due to common issues like trailing commas, markdown code fences, single quotes, or truncation. It is ideal for multi-agent pipelines that need a deterministic, rule-based fix rather than asking an LLM to re-generate the JSON. Prefer this over retrying the LLM when cost, latency, or reliability are priorities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:27.611Z","isFirstParty":false,"canonicalSlug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-76e2e18d"}