list_symbols
Retrieve top-level symbols (classes, functions, etc.) from a Python file with their names, types, line numbers, and byte offsets.
Instructions
List all top-level symbols in a Python file.
Args: project_path: Root directory of the Python project file_path: File path relative to project_path
Returns: JSON with symbols: [{"name": "Foo", "type": "class", "line": 5, "byte_offset": 42}, ...]
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": {
"project_path": "<project_path>",
"file_path": "<file_path>"
},
"name": "list_symbols"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |