lean_references
Find all usages of a symbol in Lean files by placing the cursor at its identifier. Returns every reference including the declaration, to support refactoring and code exploration.
Instructions
Find all references to a symbol (including the declaration). Position cursor at the symbol.
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": {
"file_path": "<file_path>",
"line": "<line>",
"column": "<column>"
},
"name": "lean_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Line number (1-indexed) | |
| column | Yes | Column at START of identifier (1-indexed) | |
| file_path | Yes | Absolute path to Lean file | |
| max_results | No | Max locations to return (default 50) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | List of reference locations | |
| total | No | Total matches (> len(items) when truncated by max_results) |