find_references
Find where an identifier is defined and used as file and line numbers to assess dependencies before editing shared code. Lexical matching, not a call graph.
Instructions
Finds where an identifier is defined and where it is used, as file and line numbers. Use it before editing a shared function or type, to see what depends on it, or when you know the name but not the file. These are LEXICAL matches: a same-named identifier in another class, a comment or a string counts as a match too. It is not a call graph — it does not resolve which Charge a given call site means. Prefer anyindex_search when you want code by meaning rather than by name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Restrict to one file, path relative to the indexed root | |
| symbol | Yes | Exact identifier to look for, e.g. startWatcher | |
| maxResults | No | ||
| includeDefinitions | No | Include the sites where the identifier is declared |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| truncated | Yes | ||
| otherFiles | Yes | ||
| references | Yes | ||
| definitions | Yes | ||
| lexicalOnly | Yes | ||
| matchedChunks | Yes |