search_content
Search file contents recursively using regex patterns. Find matches in files with options for case-sensitivity, hidden files, and context lines.
Instructions
Search file contents for a regex pattern (recursive).
Args:
path: Directory (or single file) to search.
pattern: Regex pattern to search for (required).
include_hidden: Include dotfiles (default False).
file_glob: Only search files matching this glob (default *, all files).
case_sensitive: Case-sensitive match (default False).
max_matches: Cap on number of result lines (default 100).
context_lines: Lines of context to include around each match (default 0).
Returns: path, pattern, file_glob, matches, count, files_scanned, truncated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| pattern | No | ||
| file_glob | No | * | |
| max_matches | No | ||
| context_lines | No | ||
| case_sensitive | No | ||
| include_hidden | No |