list_symbols
Lists a source file's symbols with exact target names and line numbers so you can pick precise edit targets before editing code.
Instructions
List the symbols of a source file, one per line as <kind> <name> (line N), class members indented under their class (method A.B.m). Each
name is the target the other tools take: overloads with their
parameter types (A.m(int)), a C++ definition outside its class by
its qualified name (A::f), and a struct or TS type that shares its
name with another symbol after its keyword (struct struct stat
targets struct stat). Kinds include function, method, class, struct,
enum, interface, namespace, type, macro, field, variable and constant;
a Go var x = func(...) {...}, listed as a variable, also takes the
body, parameter and signature tools. A name with a prototype or
forward declaration is listed once, at its definition. Read-only.
Use this when: before editing a file, to get exact target names. Don't use this when: you already know the target (read_symbol reads one symbol).
Example: file_path="/abs/path/to/module.py"
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>"
},
"name": "list_symbols"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the source or config file. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |