# JSON

Manipulate JSON data by formatting, validating, and comparing structures with ease. Query complex objects using JSONPath and perform transformations like flattening or renaming keys. Generate JSON sc…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add openclaw-ai/json-toolkit

# Browse available tools
npx -y @smithery/cli@latest tool list openclaw-ai/json-toolkit

# Get full schema for a tool
npx -y @smithery/cli@latest tool get openclaw-ai/json-toolkit json_format

# Call a tool
npx -y @smithery/cli@latest tool call openclaw-ai/json-toolkit json_format '{}'
```

## Direct MCP Connection

Endpoint: `https://json-toolkit--openclaw-ai.run.tools`

## Tools (6)

- `json_format` — Pretty-print or minify JSON. Specify indent level (default 2) or set minify=true to compact JSON into a single line.
- `json_validate` — Validate a JSON string. Returns valid=true with type info on success, or valid=false with line, column, error message, …
- `json_diff` — Compare two JSON values and return a structured diff showing added paths, removed paths, and changed values. Supports n…
- `json_query` — Query JSON data using JSONPath-like syntax. Supports: root ($), dot notation ($.a.b), bracket notation ($["key"]), arra…
- `json_transform` — Transform JSON data. Operations: "flatten" (nested→flat with dot keys), "unflatten" (flat→nested), "pick" (keep only sp…
- `json_schema_generate` — Generate a JSON Schema (draft-07 compatible) from a sample JSON object. Infers types, required fields, formats (date-ti…

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get openclaw-ai/json-toolkit <tool-name>
```
