{"uid":"cap_cRjfTmCOymoFbCA-JM-2G","slug":"prompt-guard-agentdiet-dev-deterministic-a2a-broken-json-repair-bd5af1ec","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-fix)","url":"https://prompt-guard.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_PAHhvK7LSDtVdvVV0FSwv","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":"Deterministically repairs malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, markdown fences) so multi-agent pipelines receive valid, parseable JSON.","exampleAgentPrompt":"This JSON from my LLM has trailing commas and single quotes and won't parse — can you fix it? Here it is: {'name': 'Alice', 'age': 30,}","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My language model just returned this JSON with markdown fences and trailing commas and my pipeline crashed — can you repair it so it's valid? Here's the raw output: ```json\n{\"user\": \"bob\", \"score\": 42,}\n```"},{"title":"Repair single-quoted JSON from chatbot","prompt":"I'm getting JSON back from a chatbot that uses single quotes instead of double quotes and it won't parse — can you fix this string: {'status': 'ok', 'data': {'count': 5,}}"},{"title":"Recover truncated JSON response","prompt":"My agent received a truncated JSON response that got cut off mid-string and won't parse at all — can you repair what's salvageable? Here it is: {\"items\": [\"apple\", \"banana\", \"ch"}],"resultDescription":"Returns a JSON object containing the repaired, syntactically valid JSON, allowing downstream agents and pipelines to parse and process the data without errors.","failureModes":["JSON is too severely corrupted or truncated to reconstruct meaningfully","Input string is not JSON at all (plain text, binary, etc.)","Ambiguous structure where repair would require guessing intent","Very large payloads may time out or be rejected","Payment (x402) not provided or insufficient — returns HTTP 402"],"whenToPreferThis":"Choose this endpoint when an LLM or agent in your pipeline returns malformed, truncated, or markdown-wrapped JSON that fails to parse, and you need a deterministic (non-generative) fix rather than asking an LLM to rewrite the JSON. Ideal for production multi-agent pipelines where reliability and consistency matter more than creative reconstruction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:27.050Z","isFirstParty":false,"canonicalSlug":"prompt-guard-agentdiet-dev-deterministic-a2a-broken-json-repair-9a6e7e44"}