{"uid":"cap_sZCBOlIXBw0ULlFXzcXQ-","slug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-1ac4feeb","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://mesh.agentdiet.dev/v1/repair)","url":"https://mesh.agentdiet.dev/v1/repair?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_FTKq1skZUUkNN1mAgZ35e","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"mesh.agentdiet.dev","brandSlug":"mesh-agentdiet-dev-mpp","brandBaseUrl":"https://mesh.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 LLM response I got back has broken JSON — it has trailing commas, single quotes instead of double quotes, and a markdown code fence wrapper. Can you fix it so it parses cleanly? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM output before pipeline handoff","prompt":"The structured JSON output from my summarization agent is malformed — it's got trailing commas and markdown fences around it. Can you repair it so the next agent in my pipeline doesn't crash? Here's the raw output: ```{\"summary\": \"quarterly results up\",\"confidence\": 0.87,}```"},{"title":"Recover truncated agent response","prompt":"My LLM cut off mid-response and the JSON is truncated — it never closed the last object. Can you repair this partial JSON so I can still extract the data from it? Raw string: {\"user\":\"bob\",\"orders\":[{\"id\":1,\"item\":\"widget\""},{"title":"Sanitize single-quoted JSON from legacy tool","prompt":"I'm getting JSON back from an older tool that uses single quotes instead of double quotes and it won't parse with standard JSON libraries. Can you deterministically convert it to valid JSON? Here's the string: {'product': 'gizmo', 'price': 9.99, 'available': true}"}],"resultDescription":"Returns a repaired, valid JSON object that has been cleaned of common LLM output artifacts including trailing commas, markdown code fences, single quotes, and truncation issues — ready for standard JSON parsing in downstream pipeline steps.","failureModes":["JSON is too severely corrupted or ambiguous to deterministically repair — returns error indicating unrecoverable input","Input string is empty or whitespace — fails minLength validation","JSON structure is so truncated that intent cannot be inferred — may return partial or error response","Payment required error (HTTP 402) if x402 payment not provided","Network timeout if service is temporarily unavailable"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsing — especially when outputs contain markdown fences, trailing commas, single quotes, or truncation artifacts. Prefer this over manual regex hacks or custom parsers when you need deterministic, reliable repair across all common LLM JSON failure modes. Ideal for production agentic workflows where downstream steps require valid JSON and crashes must be avoided.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:47:54.978Z","isFirstParty":false,"canonicalSlug":"mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ae3fa643"}