{"uid":"cap_PtXxu8UxVH1fKHgtdRNWv","slug":"company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-7510e5c1","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://company-enrich.agentdiet.dev/v1/repair)","url":"https://company-enrich.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_jwgarIWm_SHQjJZQ1DNpN","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"company-enrich.agentdiet.dev","brandSlug":"company-enrich-agentdiet-dev-mpp","brandBaseUrl":"https://company-enrich.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 JSON from my LLM keeps crashing my pipeline — can you fix it? Here it is: ```json {\"name\": \"Acme\", \"revenue\": 5000000, } ``` It has trailing commas and markdown fences.","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My AI agent just returned this broken JSON with trailing commas and single quotes — can you repair it so I can pass it to the next step? Here's the raw output: {'company': 'Stripe', 'founded': 2010,}"},{"title":"Strip markdown fences from JSON","prompt":"The model wrapped its response in triple-backtick markdown and now my JSON parser is failing. Can you clean it up and give me valid JSON? Raw output: ```json\n{\"status\": \"ok\", \"score\": 0.87}\n```"},{"title":"Recover truncated JSON from long generation","prompt":"My LLM got cut off mid-response and the JSON is incomplete — something like {\"results\": [{\"id\": 1, \"name\": \"Alice\". Can you repair and close it so I can parse it?"}],"resultDescription":"A repaired, valid JSON object derived from the malformed input, with issues such as trailing commas, markdown code fences, single quotes, and truncation resolved deterministically.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns an error or best-effort partial result","Input string is empty or not JSON-like at all — likely returns a validation error","Extremely long truncated JSON may be irrecoverable if key structural context is missing","Rate limiting or payment failure (HTTP 402) if x402 USDC payment is not included"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based guessing — especially in production multi-agent pipelines where consistency and low latency matter. Ideal when JSON is malformed due to known LLM output artifacts (trailing commas, markdown fences, single quotes, truncation) rather than semantic errors. Prefer it over manual parsing workarounds when reliability and auditability are required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:59.143Z","isFirstParty":false,"canonicalSlug":"company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-7510e5c1"}