Overview
JSON tool allows you to read, write, and query JSON files. The user provides JSON data; the agent parses, queries, or writes it and returns the result.Installation
Quick Start
Usage with Agent
Available Methods
read(path)
Read a JSON file.write(path, data)
Write data to a JSON file.query(path, jq_query)
Query JSON with JQ-like syntax.How It Works
Best Practices
Validate before parsing
Validate before parsing
Handle malformed JSON gracefully so the agent returns a clear error instead of crashing.
Query by path
Query by path
Extract only the fields you need rather than loading the whole document into context.
Preserve types
Preserve types
Keep numbers and booleans typed — don’t stringify everything when writing JSON back out.
Related Tools
CSV
CSV files
File
General files

