{"uid":"cap_UNn1ivVIjq77VS0jQnbde","slug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-04659dc9","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://sec-intel.agentdiet.dev/v1/malformed-json-healer)","url":"https://sec-intel.agentdiet.dev/v1/malformed-json-healer?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_ttHrAEXE9gEC5othSvbtC","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"sec-intel.agentdiet.dev","brandSlug":"sec-intel-agentdiet-dev-mpp","brandBaseUrl":"https://sec-intel.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 from our LLM has trailing commas and is wrapped in markdown fences so it keeps crashing our pipeline — can you repair it and give me back clean, valid JSON? Here it is: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"LLM output pipeline crash prevention","prompt":"Our AI model keeps returning JSON with trailing commas and markdown code fences that break our downstream parser — can you fix this malformed output so we can keep processing? Here's the bad JSON: ```json {'user': 'bob', 'items': ['a', 'b',], } ```"},{"title":"Multi-agent data handoff repair","prompt":"The previous agent in my pipeline returned a truncated JSON object that cuts off mid-value — repair it so the next agent can read it cleanly. The broken JSON is: {\"status\": \"ok\", \"results\": [{\"id\": 1, \"name\": \"foo\""},{"title":"Single-quoted JSON normalization","prompt":"I got this JSON back from a Python script that used single quotes instead of double quotes and it won't parse — can you convert it to valid JSON? Here it is: {'company': 'Acme', 'revenue': 5000000, 'active': True}"}],"resultDescription":"A repaired, valid JSON object with all malformations corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing without errors.","failureModes":["Input is so severely malformed it cannot be deterministically repaired without guessing intent — returns error or best-effort partial repair","Input string is empty or not JSON-like at all — returns validation error","Ambiguous truncation point where multiple valid completions exist — may return an error or one possible repair","Network timeout or service unavailability — returns HTTP 5xx"],"whenToPreferThis":"Choose this endpoint when you have LLM-generated or AI-produced JSON that is slightly malformed (trailing commas, markdown fences, single quotes, minor truncation) and need a deterministic, cheap fix before passing it to a downstream parser. Ideal for multi-agent pipelines where one agent's output feeds another. Prefer this over writing custom parsing logic when the malformations follow common LLM output patterns. Not suitable for completely unstructured text or deeply corrupted data that requires semantic reconstruction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:46.724Z","isFirstParty":false,"canonicalSlug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-01a54acc"}