{"uid":"cap_NKz2NRdZEL1DCkKYKAhYJ","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-a1b42e7b","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://github-audit.agentdiet.dev/v1/repair)","url":"https://github-audit.agentdiet.dev/v1/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_UNuUXwe8QGjGNNtwhh6vb","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"github-audit.agentdiet.dev","brandSlug":"github-audit-agentdiet-dev-mpp","brandBaseUrl":"https://github-audit.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":"The LLM just returned this broken JSON with trailing commas and markdown fences — can you repair it so my pipeline doesn't crash? Here it is: ```{\"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 crashing my downstream processor — please repair it: {\"status\": \"ok\", \"items\": [\"a\", \"b\",]}"},{"title":"Strip markdown fences from JSON response","prompt":"The model wrapped its JSON in triple backtick markdown fences again and now my parser is choking — can you clean this up and give me valid JSON? Here's the raw output: ```json\n{\"result\": \"success\", \"count\": 42}\n```"},{"title":"Repair single-quoted JSON from legacy system","prompt":"I'm getting JSON back from an old system that uses single quotes instead of double quotes and it won't parse — fix this string for me: {'user': 'bob', 'active': true}"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of common malformations such as trailing commas, markdown code fences, single quotes, and truncation artifacts, ready for downstream parsing and processing in multi-agent pipelines.","failureModes":["Input JSON is so severely malformed it cannot be deterministically repaired — returns error with details","Empty or null raw_json input returns validation error","Input that is not JSON at all (e.g. plain prose) may return unparseable error","Extremely long or deeply nested JSON may hit size limits"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsing due to common LLM quirks like trailing commas, markdown wrapping, or single quotes. Ideal for automated pipelines where you need deterministic, crash-free JSON repair without human intervention. Prefer this over custom regex heuristics when you want a managed, paid API with idempotency guarantees.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:31:00.048Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}