# find-references > USE THIS PROACTIVELY before modifying any code to check impact! Also use when debugging to trace where something is called from. Much more accurate than Grep - no false positives. Always use before refactoring or deleting code. - Author: joel_aniol-admin - Repository: JoelCampoint/claude_lsp - Version: 20260125221258 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/JoelCampoint/claude_lsp - Web: https://mule.run/skillshub/@@JoelCampoint/claude_lsp~find-references:20260125221258 --- --- name: find-references description: USE THIS PROACTIVELY before modifying any code to check impact! Also use when debugging to trace where something is called from. Much more accurate than Grep - no false positives. Always use before refactoring or deleting code. arguments: - name: symbol description: The symbol name to find references for required: true - name: file description: File where the symbol is defined required: false --- # Find References Use the LSP `find_references` tool to locate all usages of a symbol. ## Steps 1. Use `mcp__cclsp__find_references` with: - `symbol_name`: "{{symbol}}" {{#if file}} - `file_path`: "{{file}}" {{/if}} - `include_declaration`: true 2. Group results by file for readability. 3. Show the total count and list locations. ## Example Output ``` Found 7 references to `calculateTotal`: 📁 src/services/OrderService.php - Line 45: $total = $this->calculateTotal($items); - Line 89: return $this->calculateTotal($cart); 📁 src/controllers/CheckoutController.php - Line 23: $order->calculateTotal(); 📁 tests/OrderServiceTest.php - Line 34: $result = $service->calculateTotal([]); - Line 56: $this->assertEquals(100, $service->calculateTotal($items)); ``` ## Use Cases - **Before refactoring**: See what will be affected by changes - **Understanding code**: See how a function is used throughout the project - **Impact analysis**: Determine if a change is safe ## Fallback If LSP fails, use Grep but warn about false positives: ``` Grep for "{{symbol}}" may include: - Comments mentioning the name - Strings containing the name - Similar but different symbols ```