{"uid":"cap_iFDyZzWdtAfb0VIFib8Rk","slug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-442eeb0b","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://onchain-risk.agentdiet.dev/v1/json-normalizer)","url":"https://onchain-risk.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_ZGEZnAIyt_G-XckDfY9Qa","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"onchain-risk.agentdiet.dev","brandSlug":"onchain-risk-agentdiet-dev-mpp","brandBaseUrl":"https://onchain-risk.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":"My LLM just returned this broken JSON with trailing commas and markdown code fences — can you repair it so it parses cleanly: ```json {\"name\": \"Alice\", \"score\": 42,} ```?","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The AI agent in my pipeline returned this malformed JSON with a trailing comma and single quotes — fix it so the downstream step doesn't crash: {name: 'Bob', value: 99,}"},{"title":"Strip markdown fences from JSON response","prompt":"My model wrapped its JSON output in triple backticks and now my parser fails. Can you clean this up and return valid JSON: ```json {\"status\": \"ok\", \"count\": 5,} ```"},{"title":"Repair truncated JSON from context overflow","prompt":"My LLM got cut off mid-response and the JSON is incomplete — can you repair this truncated JSON and return the best valid version you can reconstruct: {\"items\": [{\"id\": 1, \"label\": \"foo\"}, {\"id\": 2"}],"resultDescription":"A repaired, valid JSON object with all common malformations fixed — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing.","failureModes":["Input JSON too severely corrupted to deterministically repair — returns error indicating unrecoverable structure","Empty or missing raw_json parameter — returns validation error","Input exceeds length limits — may return truncation or size error","Ambiguous truncation point — repaired output may not match original intent"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsing due to common LLM artifacts (trailing commas, markdown fences, single quotes, truncation). Ideal for deterministic, rule-based repair rather than AI-based regeneration — ensuring reproducibility and speed without additional LLM calls.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:48:11.572Z","isFirstParty":false,"canonicalSlug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0"}