| name | file-ops |
| description | Read, write, and search files in the workspace. Use when: the user asks to inspect, modify, create, or search files; you need to find code by name or content. NOT for: running scripts (use shell-exec), pulling remote URLs (use web_fetch), or pdf/image content (use the pdf/image plugins). |
| metadata | {"all_agents":{"emoji":"📁"}} |
File Operations
Compose the built-in primitives list_dir, read_file, write_file,
glob_files, find_text to navigate and edit the workspace.
Reading
list_dir { path: "." } — explore.
glob_files { pattern: "**/*.py" } — find by name.
find_text { query: "TODO", glob: "src/**" } — find by content.
read_file { path, start_line, end_line } — read a window. Always
pass an explicit line range for files larger than ~200 lines.
Writing
write_file { path, content, mode: "overwrite" } — replace.
write_file { path, content, mode: "append" } — log-style.
- For surgical edits to existing files, prefer
apply_patch (from the
apply-patch plugin) with a unified diff over a full rewrite.
Safety
All paths are resolved relative to the workspace root and a path-escape
check refuses anything that resolves outside. There is no need to
sanitize user input — the tool does it.
Sequencing rule
Never write_file without first read_file-ing the target (or
confirming via list_dir that it does not yet exist). This keeps
overwrites intentional.