{"uid":"cap_Zq4cwRAyMRwtFcEXMPF3V","slug":"agentdiet-dev-deterministic-a2a-broken-json-repair-schema-validator-181325f1","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://agentdiet.dev/v1/json-fix)","url":"https://agentdiet.dev/v1/json-fix?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_IsTX7j6isgh83-TVTSm9y","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agentdiet.dev","brandSlug":"agentdiet-dev-mpp","brandBaseUrl":"https://agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, fences) so multi-agent pipelines can process LLM outputs without crashing.","exampleAgentPrompt":"Fix this broken JSON from my LLM pipeline — it has trailing commas, markdown fences, and single quotes that are making my code crash: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fixing LLM output before database write","prompt":"My GPT-4 response came back as a JSON string with trailing commas and markdown code fences and now my database insert is failing — can you clean it up and give me valid JSON? Here it is: ```json\n{\"user\": \"bob\", \"score\": 95,}\n```"},{"title":"Repairing truncated agent JSON mid-pipeline","prompt":"My multi-agent workflow produced a truncated JSON object that cuts off mid-key and the next agent in the chain is crashing on it — repair this so the pipeline can continue: {\"order_id\": \"abc123\", \"items\": [{\"sku\": \"X1\""},{"title":"Normalizing single-quoted JSON from legacy tool","prompt":"I'm getting single-quoted JSON from a legacy tool that's incompatible with our JSON parser — fix it into proper double-quoted valid JSON: {'product': 'widget', 'price': 9.99, 'available': true}"}],"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 — ready for downstream parsing.","failureModes":["Input JSON too severely corrupted to deterministically repair — returns error or partial result","Very long or deeply nested malformed JSON may exceed processing limits","Ambiguous truncation points may result in structurally valid but semantically incorrect repairs","Missing required raw_json parameter returns a 400 error","Payment not included or failed returns HTTP 402"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline is receiving malformed JSON from language model outputs and you need a deterministic, non-probabilistic fix rather than a generative re-parse. Ideal for automated pipelines where reliability and consistency matter more than creativity, and where common LLM JSON artifacts (trailing commas, markdown fences, single quotes) are the primary failure mode.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:47:12.572Z","isFirstParty":false,"canonicalSlug":"agentdiet-dev-deterministic-a2a-broken-json-repair-schema-validator-dd9f7439"}