get_document_symbols
Get a file's structural overview by retrieving all defined symbols as a hierarchical tree or compact markdown outline for efficient analysis.
Instructions
Get all symbols defined in a document via LSP (functions, classes, variables, methods, etc.). Returns a hierarchical DocumentSymbol tree or flat SymbolInformation list depending on server support. Use this to get a structural overview of a file. Pass format: "outline" for compact markdown output (name [Kind] :line) optimized for LLM consumption — ~5x fewer tokens than JSON for the same structural information.
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": "get_document_symbols"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | ||
| file_path | Yes | ||
| language_id | No |