universal_find_references
Find all occurrences of a symbol across a workspace with file, line, and context. Use before refactoring to identify declarations, imports, and usages that will break when renaming or moving the symbol.
Instructions
Find all occurrences of a symbol across a workspace. Structured output with file, line, column, context. Optional language-aware mode (rust/typescript/python/cpp) adds role annotations: declaration, import, or usage. Use this tool BEFORE any refactoring session to understand what will break when a symbol is renamed or moved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Workspace root to search (default: primary project root) | |
| symbol | Yes | Symbol to search for (word-boundary match) | |
| language | No | Optional language-aware mode for role detection | |
| contextLines | No | Lines of context around each match (default: 1) | |
| fileExtensions | No | Restrict to these extensions (default: common source extensions) | |
| excludePatterns | No | Directories to skip (default: .git, node_modules, target, build, dist, __pycache__) |