Search files with grep
grepSearch files for text patterns using regex or literal strings, with optional glob filtering. Returns matching lines, file paths, and line numbers.
Instructions
Search for text patterns in files under the root. Supports regex patterns and optional glob filtering to limit which files are searched. Returns matching lines with file paths and line numbers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | Optional glob pattern to filter files, e.g. '**/*.js' or 'src/**/*.ts' | |
| pattern | Yes | Search pattern (regex if useRegex is true, otherwise literal string match) | |
| useRegex | No | If true, treat pattern as a regex. If false, search for literal string | |
| caseInsensitive | No | If true, perform case-insensitive search |