data_query
Extract, filter, or transform data from JSON, YAML, or TOML files using yq expressions for targeted data retrieval without modifying original files.
Instructions
Extract specific data, filter content, or transform structure without modification.
Use when you need to extract specific data, filter content, or transform the structure of a JSON, YAML, or TOML file without modifying it.
Output contract: Returns {"success": bool, "result": Any, "format": str, "file": str, ...}. Side effects: None (read-only). Failure modes: FileNotFoundError if file missing. ToolError if format disabled or query fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to file | |
| expression | Yes | yq expression to evaluate (e.g., '.name', '.items[]', '.data.users') | |
| output_format | No | Output format (defaults to same as input file format) | |
| cursor | No | Pagination cursor from previous response (omit for first page) |