Compact code search
search_codeSearch indexed code files for a pattern; returns file path, line, column, and matching line, with optional highlighting. Supports pagination and path scoping.
Instructions
Search indexed files; return path:line:col + the matching line (+ optional caret highlight). Every occurrence on a line counts, and the reported total is exact unless the scan cap trips (then it says so). Page with limit and either offset or the opaque cursor from a previous call. Vendor/build dirs are already excluded. Use pathPrefix to scope; for symbols prefer find_definition/find_references.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max matches to return (default 20). | |
| regex | No | ||
| cursor | No | Opaque token from a previous call's 'next cursor' to fetch the next page. | |
| offset | No | Skip this many matches. Ignored if cursor is given. | |
| pattern | Yes | ||
| highlight | No | ||
| ignoreCase | No | ||
| pathPrefix | No |