{"uid":"cap_giU14H3AwwZTFXsznWy1N","slug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-be6effd6","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://domain-osint.agentdiet.dev/v1/structured-output)","url":"https://domain-osint.agentdiet.dev/v1/structured-output?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_AzPKdk55DWlXnLK2dLoIR","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"domain-osint.agentdiet.dev","brandSlug":"domain-osint-agentdiet-dev-mpp","brandBaseUrl":"https://domain-osint.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated, malformed, or markdown-wrapped LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.","exampleAgentPrompt":"This LLM response came back as broken JSON with trailing commas and markdown code fences — can you repair it so I can use it downstream? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix crashed agent pipeline JSON","prompt":"My downstream agent just crashed because the LLM returned JSON with a trailing comma and unclosed bracket — can you repair this raw string so I can continue the pipeline: '{\"status\": \"ok\", \"items\": [1, 2, 3,}'?"},{"title":"Strip markdown fences from structured output","prompt":"The model wrapped its JSON response in triple-backtick markdown fences and now my parser is failing — please clean and repair this string: '```json\n{\"result\": \"success\", \"score\": 0.95}\n```'"},{"title":"Recover single-quoted JSON from LLM","prompt":"I got back a response using single quotes instead of double quotes and it's not valid JSON — can you fix this malformed string so it becomes parseable: \"{'user': 'bob', 'active': true}\"?"}],"resultDescription":"A repaired, valid JSON object parsed from the malformed input string. The endpoint deterministically corrects issues like trailing commas, markdown code fences, single quotes, and truncation, returning a clean structured object ready for downstream agent or pipeline consumption.","failureModes":["Input is so severely malformed that repair is impossible — returns error indicating unparseable input","Non-JSON content passed as raw_json (e.g. plain text, binary) — may return parsing error or empty object","Extremely long truncated JSON where context is insufficient to infer missing structure — partial repair or failure","Missing required raw_json parameter — returns 400 or validation error","Payment not fulfilled (x402) — returns 402 Payment Required before processing"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline frequently receives malformed, truncated, or markdown-wrapped JSON that breaks downstream parsers. It is especially valuable when you need deterministic (not probabilistic) repair, want to avoid writing custom JSON-cleaning logic, or are operating in a pay-per-call x402 micropayment context. Prefer this over manual regex cleaning or LLM re-prompting when reliability and consistency are critical.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:32.625Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-544ae7e3"}