Compact code search
search_codeFind exact lines matching a pattern across indexed source files, returning file path, line, and column with optional highlight and pagination.
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 |