{"uid":"cap_v9pR4lU9cU7KlYHAgrWxm","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-4a4462d0","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://serp-extract.agentdiet.dev/v1/structured-output)","url":"https://serp-extract.agentdiet.dev/v1/structured-output?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"limit":{"type":"integer","default":20,"maximum":100,"minimum":1,"description":"Maximum number of items to return per page (1-100)"},"cursor":{"type":"string","description":"Opaque pagination cursor for fetching the next page"},"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_ysZCCnZCyHge0qpaZGPhF","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"serp-extract.agentdiet.dev","brandSlug":"serp-extract-agentdiet-dev-mpp","brandBaseUrl":"https://serp-extract.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs so multi-agent pipelines can process them without crashing.","exampleAgentPrompt":"This JSON from the LLM came back broken — it has trailing commas, markdown fences, and single quotes. Can you repair it so it's valid JSON I can actually use: ```{'name': 'Alice', 'age': 30,}```?","exampleUseCases":[{"title":"Fix LLM pipeline broken JSON","prompt":"The language model in my pipeline returned this malformed JSON with trailing commas and markdown code fences — can you clean it up and give me valid JSON? Here it is: ```json\\n{\\\"user\\\": \\\"bob\\\", \\\"score\\\": 42,}\\n```"},{"title":"Repair single-quoted agent output","prompt":"My agent produced JSON using single quotes instead of double quotes and it's breaking my downstream parser. Fix this so it's valid: {'product': 'widget', 'price': 9.99, 'available': True}"},{"title":"Recover truncated LLM JSON response","prompt":"The LLM truncated its JSON response midway and now it won't parse — can you repair this truncated output and return the best valid JSON you can reconstruct from it: {\"items\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2, \"name\":"}],"resultDescription":"Returns a repaired, valid JSON object that has been cleaned of common LLM-introduced defects including trailing commas, markdown code fences, single quotes, and truncation artifacts, making it safe for downstream parsing and processing.","failureModes":["Input JSON too severely truncated to reconstruct meaningfully","Input is not JSON-like at all and cannot be repaired","Ambiguous structure where multiple valid repairs are possible","Payment failure via x402 protocol","Network timeout on large JSON inputs"],"whenToPreferThis":"Choose this endpoint when LLM or agent outputs produce malformed JSON that breaks downstream pipelines, especially in automated multi-agent workflows where you cannot afford manual intervention. Ideal when dealing with common LLM quirks like markdown fences, trailing commas, or single quotes that standard JSON parsers reject.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:46:08.374Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}