# AgentTools JSON Formatter & Validator

> AgentTools JSON Formatter & Validator is a paid API for AI agents from agenttools-hub.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Validates JSON with precise error messages, pretty-prints it with configurable indentation, and reports the top-level type and element count.

## Facts

- Endpoint: GET https://agenttools-hub.vercel.app/api/v1/dev/json-formatter?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agenttools-json-formatter-validator-ba207acf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6ba-qWFqIx53f-iuoyEOT

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 agenttools-json-formatter-validator-ba207acf
```

Example prompt: Can you validate this JSON and pretty-print it with 2-space indentation: '{"name":"Alice","age":30,"active":true}'?

## When to prefer this

Choose this endpoint when you need to quickly validate, format, or inspect JSON without running code — especially useful when an agent receives raw JSON from an external source and needs to confirm its validity before further processing, or when a human-readable formatted version is needed for display or debugging. Prefer this over writing custom parsing logic when the task is purely structural inspection or beautification.

## Known failure modes

- Missing required 'json' query parameter returns an error
- Malformed JSON input returns a validation error with a descriptive message indicating the parse failure location
- Invalid indent value (non-numeric) may cause unexpected formatting behavior
- Extremely large JSON payloads may hit URL length limits since input is passed as a query parameter

## How this service works

Validate JSON with precise error messages, pretty-print it with any indent, and inspect its top-level type and element counts. Use this when an agent needs to validate, pretty-print and inspect JSON.

## Output

Returns a validation status (valid or error with precise error message), the pretty-printed JSON string formatted with the requested indentation, the top-level type (object, array, string, number, boolean, null), and the count of top-level elements or keys.

## 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": [
      "json"
     ],
     "properties": {
      "json": {
       "type": "string",
       "description": "JSON"
      },
      "indent": {
       "type": "number",
       "description": "Indent spaces"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agenttools-json-formatter-validator-ba207acf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agenttools-hub.vercel.app](https://www.zero.xyz/host/agenttools-hub.vercel.app/llms.txt)
