{"uid":"cap_JaK5VkESR5DRsR-gao97w","slug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-584efd42","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://sec-intel.agentdiet.dev/v1/schema-repair)","url":"https://sec-intel.agentdiet.dev/v1/schema-repair?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_Cq8agvowcbFpm0ZEi8ejf","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"sec-intel.agentdiet.dev","brandSlug":"sec-intel-agentdiet-dev-mpp","brandBaseUrl":"https://sec-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash","exampleAgentPrompt":"The JSON my LLM just returned has trailing commas and is wrapped in markdown code fences — can you repair it so it's valid JSON I can parse? Here's the raw output: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My AI pipeline keeps crashing because the model keeps returning JSON with trailing commas and markdown fences around it — can you clean up this raw output so it parses correctly? Here's the broken string: ```json {\"status\": \"ok\", \"items\": [1, 2, 3,]} ```"},{"title":"Repair single-quoted JSON keys","prompt":"My language model returned JSON using single quotes instead of double quotes, and now my downstream tool can't parse it — can you repair this string: {'user': 'bob', 'score': 42} so it's proper valid JSON?"},{"title":"Recover truncated agent response","prompt":"The JSON response from my agent got cut off mid-stream and now it's incomplete — can you try to repair this truncated JSON string and give me back something parseable: {\"results\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2, \"name\":"}],"resultDescription":"Returns a repaired, schema-valid JSON object with the fixed JSON string, ready for programmatic consumption by downstream agents or pipeline steps","failureModes":["Input JSON is so severely corrupted that deterministic repair is impossible — returns error indicating unrecoverable malformation","Input string is empty or too short to infer structure","JSON structure is ambiguous after repair and multiple valid interpretations exist","Rate limiting or payment failure for x402 micropayment"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or LLM-generated JSON that fails standard JSON.parse() — especially when you need deterministic, reproducible fixes (not probabilistic LLM re-generation) and need to handle common LLM artifacts like markdown fences, trailing commas, and single-quoted keys at low per-call cost ($0.002).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:56.135Z","isFirstParty":false,"canonicalSlug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-01a54acc"}