Get File or Directory Structural Outline
get_file_outlineExtract a structural AST outline of a file or directory, including types, functions, members, and line ranges, without reading raw source. Inspect structure before fetching code ranges.
Instructions
Extract the structural AST outline of a single source file (declared types, functions, members, and 1-based line ranges) or a directory (immediate subfolders, files, line counts, and top-level symbols) without reading raw source text. Use to inspect file or folder structure before fetching code ranges; to read actual source lines use fetch_code_snippets, and to search declarations across the workspace by name use find_symbol. Queries the indexed .codeexplorer/graph.db (switching output shape automatically based on whether filePath resolves to a file or directory, with '.' targeting the workspace root) and returns YAML symbol trees or folder summaries without truncating large files.
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": {
"filePath": "<filePath>"
},
"name": "get_file_outline"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Required file or directory path to outline (workspace-relative path, absolute path, or '.' for the workspace root). | |
| workspacePath | No | Optional absolute path to the target workspace root directory. Omit to use the bound workspace, active client root, or sticky session workspace. |