{"uid":"cap_usln8Sv24jSTh9ayNT0tT","slug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-78051e63","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://llms-generator.agentdiet.dev/v1/malformed-json-healer)","url":"https://llms-generator.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_ct1WNFuabkn9IldVzVmZP","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"llms-generator.agentdiet.dev","brandSlug":"llms-generator-agentdiet-dev-mpp","brandBaseUrl":"https://llms-generator.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash on bad output.","exampleAgentPrompt":"This LLM output came back with markdown fences, trailing commas, and single quotes — can you repair it into valid JSON so I can pass it to the next step? Here's the broken string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent just got back this malformed JSON from the model and the pipeline crashed — can you repair it so it parses correctly? The broken string is: {\"name\": \"Bob\", \"score\": 0.92,}"},{"title":"Strip markdown fences from model output","prompt":"The LLM wrapped its JSON in triple backticks and now my parser is failing. Can you clean up this output and give me valid JSON? Here it is: ```json\n{'status': 'ok', 'results': [1, 2, 3],}\n```"},{"title":"Normalize single-quote JSON from agent","prompt":"One of my sub-agents returned JSON using single quotes instead of double quotes and it won't validate. Please repair this into proper JSON: {'user': 'carol', 'active': true, 'tags': ['a', 'b']}"}],"resultDescription":"Returns a repaired, valid JSON object that has been corrected for common LLM output issues including trailing commas, markdown code fences, single-quote delimiters, and truncation — ready for safe downstream consumption in agent pipelines.","failureModes":["JSON too malformed to deterministically repair — returns error indicating repair failure","Empty or missing raw_json parameter — returns validation error","Input string is not JSON-like at all — may return error or empty object","Extremely long truncated JSON may fail structural inference"],"whenToPreferThis":"Use this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse due to common formatting issues like trailing commas, markdown fences, or single quotes. Ideal for agent orchestration layers that need deterministic, rule-based repair rather than probabilistic LLM re-prompting. Prefer over re-querying the LLM when you need fast, cheap, and deterministic correction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:07.050Z","isFirstParty":false,"canonicalSlug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-76e2e18d"}