List top-level symbols in a Swift file
swiftGetSymbolsOverviewRetrieves top-level symbols declared in a Swift file for quick orientation after navigating to a new file. Optionally includes nested children.
Instructions
[mg.code] Cheap orientation: returns the top-level symbols (classes, structs, enums, protocols, free functions) declared in a Swift file via SourceKit-LSP's documentSymbol. Set topLevelOnly: false for nested children too. Useful right after swiftGetSymbolDefinition lands you in a new file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to a Swift source file. | |
| projectRoot | No | ||
| topLevelOnly | No | Return only top-level symbols (classes, structs, enums, protocols, free functions). When false, returns nested children too. Default true keeps responses small. |