locate
Locate symbols in a repository by name, returning file, line, and body hash. Verify symbol existence with zero-match results, avoiding grep pitfalls like formatting variance and false positives.
Instructions
Deterministically locate symbols in an enrolled repo: name → file:line (+ short body hash). Pass symbol to find a specific definition without grepping (a named lookup searches every kind); omit it to list all (capped, paginate with offset) — the unfiltered list defaults to functions+classes. Use this to verify a symbol exists before claiming it does: a zero-match result is definitive (parsed from the live AST), unlike grep, which can miss real symbols (formatting/whitespace variance, multi-line signatures) or hit false positives (comments, strings).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | restrict to func|class|export|import (default: func+class) | |
| repo | Yes | name of an enrolled repo | |
| offset | No | skip this many matches before returning a page (default 0). Page again with the response's next_offset until it's absent. | |
| symbol | No | symbol to locate: matches by exact name, name prefix, or last dotted segment (e.g. "fetch" finds "Reader.fetch"). Omit to list all (capped). |