references
Find usages of a symbol across a directory, including calls, imports, and type references, with exact tree-sitter-backed matching to avoid false positives.
Instructions
Find who USES a symbol across a directory — the inverse of find. "Who calls X", "what imports it", "where is it used as a type". The reference workflow lens otherwise sends you to grep for, but tree-sitter-backed so a same-named string or comment is never a false positive. Returns JSON {symbol, path, references[{file, line, kind, context}], byKind, filesScanned, totalSupportedFiles, truncated, skipped?}. kind is call | instantiation | import | type-ref | reference | definition (the definition site is included, labelled). context is the source line. Matching is EXACT (references need precision). Caps: scans up to 400 files, returns up to 300 references (truncated:true = more exist — narrow the path). Languages: TS/TSX/JS/JSX/Python. lens is a navigation map over code and docs: use it to LOCATE things, then Read the actual source/section before judging or modifying it. A signature is not the body; an outline is not the section.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Exact symbol name to find references for (a function/class/const/type from find or overview). | |
| path | No | Directory (or single file) to search. Default "." (whole workspace). |