grep
Find exact strings or regex patterns in cached files, showing line numbers and surrounding context.
Instructions
Cache-only ripgrep: exact string/regex with line numbers.
Use search for semantic intent. Seed files with batch_read first;
empty results often mean files not cached.
Args:
pattern: Regex pattern, or a literal if fixed_string=true.
path: Optional exact path, suffix, or glob filter.
fixed_string: Treat pattern as a literal instead of regex.
case_sensitive: Whether matching is case-sensitive.
context_lines: Number of context lines to include around matches.
max_matches: Maximum total matches across all files.
max_files: Maximum number of files to return.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | ||
| path | No | ||
| fixed_string | No | ||
| case_sensitive | No | ||
| context_lines | No | ||
| max_matches | No | ||
| max_files | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truncated | No | ||
| pattern | No | ||
| path | No | ||
| total_matches | No | ||
| files_matched | No | ||
| files | No | ||
| truncated_matches | No | ||
| truncated_files | No | ||
| fixed_string | No | ||
| case_sensitive | No | ||
| context_lines | No |