# Agent Data Tools: JSON Repair

> Agent Data Tools: JSON Repair is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Attempts to parse and repair malformed or broken JSON text, returning the corrected JSON string and a validity flag

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/json/repair?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-json-repair-2c2be246
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BomNrkJnk-aF1Kf_BsA--

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-data-tools-json-repair-2c2be246
```

Example prompt: Can you repair this broken JSON for me? The text is: {"name":"Ada","tags":["x" — it's missing the closing brackets and I need it fixed.

## When to prefer this

Use this endpoint when you have a JSON string that fails to parse due to syntax errors, truncation, missing brackets, unquoted keys, or other common formatting issues and you need a fast, cheap ($0.001 USDC), no-account-required fix. Prefer this over manual regex fixes or LLM prompting for JSON repair when cost and reliability matter.

## Known failure modes

- JSON is too severely corrupted to be automatically repaired
- Input is not JSON at all (plain text, XML, YAML) and cannot be meaningfully repaired
- Very large JSON payloads may exceed query parameter length limits
- Missing required 'text' query parameter returns an error

## How this service works

566 pay-per-call tools for AI agents over HTTP or MCP, from $0.002 a call, most at $0.01. Every caller gets 25 free calls; then pay per call in USDC via x402 (Base, Polygon, Arbitrum, Solana) or by card with prepaid credits from /credits. No account needed; failed calls are never charged; per-tool reliability is public at /status. Crypto: token prices and wallet portfolios from Uniswap v3, chain reads on Base, Ethereum, Arbitrum, Optimism and Polygon, OFAC sanctions screening. Web: Read public static documentation, pages, PDFs and RSS feeds as clean text, plus link previews and sitemaps. Business: company profiles, domain and email checks. Also Bitcoin, FX, weather, holidays, geocoding, AI text, and JSON, date and validation utilities.

## Output

Returns a JSON object with a boolean 'valid' field indicating whether the input was valid or needed repair, and a 'repaired' field containing the corrected JSON string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "examples": [
        "```json\n{name: 'Ada', tags: ['x',],}\n```"
       ],
       "description": "The broken JSON text"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "valid": {
       "type": "boolean"
      },
      "repaired": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "repaired": "{\"name\":\"Ada\",\"tags\":[\"x\"]}"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-json-repair-2c2be246/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
