Symbol references
project_symbol_referencesFind all references to a named symbol in a file or workspace before renaming or refactoring, returning each path, line number, and context.
Instructions
Find every occurrence of a named symbol. scope=file (fast, single file) or scope=workspace (uses content search). Use when: you need to know where a symbol is used before renaming/refactoring it. Avoid when: you only need its declaration (project_file_symbols) or an arbitrary string (project_search). Speed: fast for scope=file; medium for scope=workspace (single search call). Output: symbol_references: count, references[] {relative_path, line_number, context}. Batch-safe: yes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| scope | No | ||
| symbol_name | Yes | ||
| relative_path | No | Path inside the workspace (relative, or absolute inside the workspace) | |
| max_references | No |