### Grep Tool
**Tool Name**: `grep`
**Tool Description**: Literal text and regex search over file contents (source, configs, logs, prose). Relative paths are resolved under cwd. Use for substrings, comment markers (TODO/FIXME), version strings, and non-source files. NEVER use for code structure queries — `ast_grep` avoids false positives in comments/strings.
**What belongs to `ast_grep`, not `grep`**: function definitions (`fn name`), struct/enum definitions (`struct Foo`, `enum Bar`), method calls (`.method()`), type-qualified calls (`Type::variant`), attributes (`#[allow(...)]`), control-flow shapes (`unwrap()`, `match`, `if let`).
**Split mixed searches**: if a query combines literal text with code-structure patterns, run two searches — `grep` for the literal part, `ast_grep` for the structural part. NEVER combine them in one `grep` alternation (e.g., `TODO|unwrap()` mixes correct and incorrect uses).
**Tool Arguments**:
- `pattern`: required, string, example: `TODO|FIXME`
- `path`: optional, string, example: `src/tests`
- `limit`: optional, integer, min: 1
- `context`: optional, integer, min: 0