Symbol references
symbol_referencesFind every occurrence of a symbol name across one file or the workspace before renaming or changing it, with match counts, line numbers, and code context.
Instructions
Find occurrences of a symbol name. scope=file needs relative_path (one file); scope=workspace (default) searches all files. Use when: you check where a symbol is used before renaming or changing it. Avoid when: you only need its declaration (outline_symbol) or arbitrary text (search). Output: count (matches found), returned (how many came back), omitted (cut by the cap), scan_limit (workspace only), references[] {relative_path, line_number, context}.
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_name": "<symbol_name>"
},
"name": "symbol_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | scope=workspace only: how many workspace hits to SCAN (default: max_references, max 200). Not used for scope=file. | |
| scope | No | workspace = search all files (default); file = search one file. scope=file requires relative_path. | |
| symbol_name | Yes | Symbol name to find (matched as a whole word). | |
| relative_path | No | Required when scope=file; with scope=workspace it narrows the search to this subtree. | |
| max_references | No | How many references come BACK (default 100, max 500). Applies in both scopes; this is the token bill. |