Search tools
Parent: Tools and workspace.
grep searches file contents with a regex. glob lists files whose paths match a pattern. Both run in-process and do not need rg, fd, or RTK. Prefer these tools over shell search for workspace inspection. grep content mode mints chainable [path#TAG] snapshots only when the selected edit tool is hashline. Match text is search preview only.
- Patterns:
greptakes a Rust/regexpattern.globtakes a path glob; a pattern with no/(for example*.rs) matches nested paths as**/*.rs. - Path:
greppathmay be a directory or a single file. A file path searches that file only, including when a directory walk would have skipped it as ignored or hidden. - Defaults: directory walks honor
.gitignore, skip hidden files, and never follow symlinks. Passinclude_hiddenwhen you need dotfiles. - Order: results come back in walk order, sorted by name within each directory, so repeat runs agree and a capped result is the first N paths shown rather than an arbitrary sample.
- Caps: results are bounded (default 200).
grepalso caps matches per file and trims long lines. Every capped, timed-out, or cancelled search says so in its summary, including when it found nothing. - Output:
grepgroups matches by file. Content mode showsN | textmatch previews. When the selected edit tool ishashline, each file is prefixed with a chainable[path#TAG]header. Copy the tag and line numbers intoPUTandCUToperations. Do not copy preview bodies because they may be truncated. Useread_filewhen you need exact line text. Setoutput_modetofiles_with_matchesorcountwhen you only need paths or tallies; default iscontent. - Permissions: both request read access only. Workspace-scoped searches, plus the user's global
AGENTS.md, skill trees, and agent definitions, work in every permission mode, includingplan. Other searches outside the workspace are denied inplanand ask first inauto,allow_edits, andsupervised.