get_definition
Find where Python symbols are defined in code by analyzing a specific position. This tool helps developers navigate codebases and understand symbol origins during static analysis.
Instructions
Get definition location at a specific position.
Returns the location of the definition for the symbol at the given position.
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": {
"code": "<code>",
"position": "<position>"
},
"name": "get_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code as string. | |
| position | Yes | Character position (0-indexed) in the code. | |
| python_path | No | Optional path to Python interpreter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||