Search codebase
search_codebaseSearch the workspace for literal text or regex patterns, respecting .gitignore and skipping generated or binary files, and return matching lines with context and relative paths.
Instructions
Search the workspace with ripgrep (respects .gitignore; skips node_modules, dist, lockfiles and binaries). Returns matching lines with surrounding context and paths relative to the workspace root.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Remote mode only: which allowlisted repo ("owner/repo") to operate on. Optional when only one repo is allowlisted; ignored in local mode. | |
| query | Yes | Text to search for. Treated literally unless is_regex is true. | |
| is_regex | No | Interpret query as a (Rust-flavored) regular expression. | |
| path_glob | No | Restrict to files matching this glob, relative to the root, e.g. "src/**/*.ts" or "*.py". | |
| max_results | No | Maximum matches to return. Default 30. | |
| context_lines | No | Lines of context before and after each match. Default 2. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes | ||
| truncated | Yes | ||
| workspace | Yes | ||
| total_matches | Yes | ||
| files_with_matches | Yes |