search_code
Search source files for a substring and return matching lines with file paths, line numbers, and surrounding code to locate where a term appears in a repository.
Instructions
Search source files for a substring (case-insensitive by default). Returns path:line hits with surrounding line text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Repository root. Defaults to REPO_CONTEXT_ROOT or cwd. | |
| query | Yes | Substring to search for. | |
| max_results | No | Maximum hits (default 50). | |
| case_sensitive | No | Case-sensitive search (default false). |