find_references
Locate all usages of a function, class, or symbol in a codebase, with optional filters for call, import, or inheritance references.
Instructions
Find all usages of a function, class, or symbol in the codebase.
Args:
symbol: The name of the function/class/variable to search for
directory: Path to the codebase directory to search
ref_type: Optional filter: 'call', 'import', 'inherit' (empty for all)
Returns:
List of locations where the symbol is used
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>",
"directory": "<directory>"
},
"name": "find_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| ref_type | No | ||
| directory | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |