getDocumentSymbols
Get symbols (classes, functions, methods, interfaces) from a file with kind filtering and depth control. Includes names, types, and parent structure.
Instructions
List symbols (fns, classes, interfaces, methods) in a file: names, kinds, lines, parents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Workspace or absolute path to the file | |
| kind | No | Filter to one or more symbol kinds (e.g. ['Class','Function','Method','Interface']). Case-insensitive. Cuts variable noise on large bundled files. | |
| maxDepth | No | Max nesting depth to include (0=top-level only, 1=top + immediate children, …). Default: no depth filter. LSP returns a flattened list keyed by 'parent' name; depth is computed by walking the parent chain. | |
| topN | No | Cap returned symbols. Default 500. Combined with kind/maxDepth filters which apply first. |