find_references
Locate every occurrence of a function, class, or variable in your codebase with file and line details, enabling analysis of dependencies and call chains.
Instructions
Find all references to a symbol (function, class, variable, type) across a directory using ripgrep. Returns file, line, and matching text. Use to trace call chains and understand usage before modifying.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>",
"path": "<path>"
},
"name": "find_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to a directory to search in | |
| symbol | Yes | Symbol name or regex pattern to search for | |
| maxResults | No | Maximum results to return (default 50) | |
| filePattern | No | Optional glob to filter files (e.g. '*.ts', '*.vue') |