Overview
The filesystem tools provide sandboxed file access within the agent’s workspace. All paths are validated against the workspace root to prevent directory traversal.Tools
read_file
Reads a file with line numbers (cat -n style). Supports pagination via offset and limit.
offset and limit parameters. Without them, the tool returns an error message directing the agent to use pagination.
grep
Search file contents with context lines, case-insensitive matching, and result limits.| Parameter | Default | Description |
|---|---|---|
pattern | required | Text to search for |
path | "." | Directory to search |
glob_filter | "*" | File glob filter |
context | 0 | Lines before and after (-C) |
before | 0 | Lines before match (-B) |
after | 0 | Lines after match (-A) |
case_insensitive | False | Case-insensitive matching |
max_results | 50 | Maximum matches returned |
edit_file
Replaces text and shows a unified diff:glob
Find files matching a pattern. Capped at 100 results.ls, write_file, mkdir
Standard file operations, all workspace-scoped.Workspace Isolation
All paths are resolved relative to the workspace root (set via$AGENT_WORKSPACE or the CLI’s --workspace flag). Path traversal attempts (../../../etc/passwd) are blocked.