| Name | Type | Description |
|---|---|---|
pattern* | str | Literal string to search for (NOT regex). |
path | str | None | Default: NoneDirectory or file path to search in. Defaults to current directory. |
glob | str | None | Default: NoneOptional glob pattern to filter which files to search. |
max_count | int | None | Default: None |
context_lines | int | Default: 0 |
Search for a literal text pattern in files.
Uses ripgrep if available, falling back to Python search.
Optional total cap on returned matches across all files.
None returns every match; an int stops the search once the cap
is reached and flags the result with truncated=True.
Number of lines to include before and after each match.
This is a backend-level API. It is deliberately not exposed
through the agent-facing grep tool (GrepSchema), so matches
returned via that tool never carry context.