{"uid":"cap_MsVjHRrBSK2RcBRSbRwtk","slug":"token-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ec416234","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://token-intel.agentdiet.dev/v1/json-normalizer)","url":"https://token-intel.agentdiet.dev/v1/json-normalizer?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_uHwb98lv8PE1owD7axihP","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"token-intel.agentdiet.dev","brandSlug":"token-intel-agentdiet-dev-mpp","brandBaseUrl":"https://token-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped JSON strings from LLM outputs so multi-agent pipelines can reliably parse structured data without crashing.","exampleAgentPrompt":"This JSON string came back from an LLM and won't parse — it has trailing commas and markdown fences wrapping it. Can you run it through the JSON normalizer and give me the clean, valid version? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My AI pipeline just got back this garbled JSON from the language model — it has single quotes instead of double quotes and a trailing comma. Can you repair it so the downstream agent can parse it? Here's the raw string: {'user': 'Bob', 'score': 95,}"},{"title":"Strip markdown fences from structured output","prompt":"The LLM wrapped its JSON response in triple-backtick markdown fences and I can't parse it programmatically. Can you clean it up and return just the valid JSON object? Here's what came back: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3]}\n```"},{"title":"Recover truncated JSON from context cutoff","prompt":"My model ran out of context and the JSON it returned got cut off mid-structure — it's missing the closing brackets and braces. Can you repair and complete the JSON so it's valid? The broken string is: {\"report\": {\"title\": \"Q1 Results\", \"data\": [1, 2"}],"resultDescription":"A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — returned as a parseable JSON response.","failureModes":["Input is so severely malformed that deterministic repair is not possible — returns error indicating unrecoverable JSON","Input string is empty or contains no JSON-like structure — returns validation error","JSON is ambiguous after truncation and cannot be deterministically completed — may return partial repair with warning","Service unavailable or payment failure via x402 — returns HTTP 402 or 5xx error"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline needs deterministic, rule-based JSON repair rather than probabilistic LLM-based fixing. Ideal when you need consistent, repeatable normalization of common LLM output artifacts like trailing commas, markdown fences, and single quotes, and when you cannot afford non-deterministic behavior in a production pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:10.090Z","isFirstParty":false,"canonicalSlug":"token-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-12f4b582"}