search_files
Locate specific text or regex matches across project files, returning file paths, line numbers, and matching lines. Filter by filename patterns and case sensitivity to pinpoint code quickly.
Instructions
Search for a text string or regex pattern across all files in the project. Returns matching file paths, line numbers, and the matching lines. Optionally filter by file name glob (e.g. '*.ts'). Skips node_modules, hidden directories, and binary files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The text or regular expression to search for | |
| is_regex | No | Treat query as a regular expression (default: false) | |
| directory | No | Subdirectory to search in, relative to project root. Leave empty to search the whole project. | |
| file_pattern | No | Optional filename filter, e.g. '*.ts' or '*.json'. Matches against the filename only, not the full path. | |
| case_sensitive | No | Whether the search is case-sensitive (default: false) |