search_files
Find files by pattern with built-in content previews, respecting .gitignore and filtering by size or date, to explore unfamiliar codebases or analyze build infrastructure without separate read calls.
Instructions
USE INSTEAD OF GLOB/FIND. Find files by pattern with built-in previews - eliminates follow-up read calls.
Respects .gitignore, skips binary files, filters by size/date, handles symlinks safely. Perfect for exploring unfamiliar codebases or analyzing build infrastructure.
Set detail_level="full" to get content previews without separate read calls.
Examples: ".yml" in .github/workflows/, "**/Jenkinsfile", "*.config.js"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reasoning | Yes | Explain why you are using this tool - helps track search patterns and improve results | |
| pattern | Yes | File name or glob pattern to match, e.g. "*.ts", "test_*", "src/**/*.config.js" | |
| path | No | Directory to search in. Defaults to current working directory | |
| include_hidden | No | Include hidden files and directories (dotfiles). Default: true | |
| ignore_gitignore | No | Respect .gitignore rules and skip ignored files. Default: true | |
| exclude | No | Additional patterns to exclude, e.g. ["node_modules", "dist", "*.log"] | |
| detail_level | No | How much info to return: "minimal" (paths only), "standard" (+ size/date), "full" (+ content preview) | standard |
| modified_within | No | Only find files modified within this time, e.g. "24h", "7d", "30m" | |
| min_size | No | Only find files larger than this size, e.g. "1MB", "500KB", "1GB" |