{"uid":"cap_ElFrE94S64vQ4l6tJG2Uj","slug":"prompt-guard-agentdiet-dev-deterministic-a2a-broken-json-repair-e8e3a23e","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://prompt-guard.agentdiet.dev/v1/json-validator)","url":"https://prompt-guard.agentdiet.dev/v1/json-validator?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_L4sDphWIWXY6n7OCMDgyX","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"prompt-guard.agentdiet.dev","brandSlug":"prompt-guard-agentdiet-dev-mpp","brandBaseUrl":"https://prompt-guard.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, markdown fences) so multi-agent pipelines stay stable","exampleAgentPrompt":"Fix this broken JSON from my LLM — it has trailing commas and markdown backtick fences wrapping it: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Repair LLM JSON in agent pipeline","prompt":"My LLM just returned this JSON with a trailing comma and it's crashing my pipeline — can you repair it so I can pass it to the next step? Here it is: {\"user\": \"Bob\", \"score\": 95,}"},{"title":"Strip markdown fences from model output","prompt":"My AI model wrapped its JSON response in triple backtick markdown fences and my parser can't handle it — clean it up and give me valid JSON: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3]}\n```"},{"title":"Fix single-quoted JSON from chatbot","prompt":"I got this JSON back from a chatbot but it's using single quotes instead of double quotes, which isn't valid — can you convert it to proper JSON? {'product': 'widget', 'price': 9.99}"}],"resultDescription":"A repaired, valid JSON object derived from the malformed input string, with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures completed where possible.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error indicating unrecoverable structure","Input string is empty or missing (minLength:1 violated) — returns validation error","JSON is ambiguous after truncation and cannot be completed deterministically — may return partial result or error","Network timeout or service unavailability — returns HTTP 5xx","Payment not completed via x402 protocol — returns HTTP 402 requiring payment"],"whenToPreferThis":"Use this endpoint when you need deterministic, rule-based JSON repair in a multi-agent pipeline — particularly when LLM outputs contain predictable syntax errors like trailing commas, markdown fences, or single quotes. Prefer this over custom parsing code when you want a reliable, paid microservice that handles these common LLM output artifacts without hallucinating or guessing at content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:49.105Z","isFirstParty":false,"canonicalSlug":"prompt-guard-agentdiet-dev-deterministic-a2a-broken-json-repair-9a6e7e44"}