{"uid":"cap_H7-8khDehwm0scN_0CA3V","slug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-97fec450","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":"POST","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__aN0k-jNQYXvyIfM68JU7","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 or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines can reliably parse structured outputs.","exampleAgentPrompt":"This JSON output from the LLM is broken — it has trailing commas and markdown fences wrapping it. Can you repair it so it parses cleanly? Here's the raw string: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"The structured output my agent produced has a trailing comma and single quotes instead of double quotes — it keeps crashing the parser. Can you repair this raw JSON string so it becomes valid and my pipeline can continue?"},{"title":"Strip markdown fences from agent output","prompt":"My LLM wrapped its JSON response in triple-backtick markdown fences again. Can you clean and repair this raw string so I get a proper JSON object back without any markdown artifacts?"},{"title":"Recover truncated JSON from a timeout","prompt":"The JSON response got cut off mid-object because of a token limit — it's missing closing brackets and braces. Can you deterministically repair this truncated JSON string so it's valid and complete enough to use?"}],"resultDescription":"Returns a repaired, valid JSON object reconstructed from the malformed input. The response contains the fixed JSON structure with syntax errors corrected, markdown fences removed, trailing commas stripped, and single quotes normalized to double quotes — ready for downstream parsing by agents or pipelines.","failureModes":["Input is too severely malformed to deterministically repair — returns error with description","Input string is empty or missing raw_json field — returns 400 validation error","JSON structure is ambiguous after truncation — may return best-effort partial repair","Payment not received or x402 auth fails — returns 402 Payment Required","Service timeout on very large malformed inputs"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or markdown-wrapped JSON from an LLM and needs deterministic repair without hallucination. Prefer this over prompt-based repair (asking the LLM to fix it) when you need guaranteed idempotency, low latency, and no additional token cost from re-prompting. Ideal for agentic workflows where structured output reliability is critical and retrying the LLM is expensive or impractical.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T00:44:01.522Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-544ae7e3"}