tree
Get an overview of a codebase with a structural tree showing files, classes, functions, and line ranges. Automatically adjusts detail level to fit output limits.
Instructions
Get the structural tree of the project with file headers, function names, classes, enums, and line ranges. Automatically reads 2-line headers for file purpose. Dynamic token-aware pruning: Level 2 (deep symbols) -> Level 1 (headers only) -> Level 0 (file names only) based on project size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_tokens | No | Maximum tokens for output. Auto-prunes if exceeded. Default: 20000. | |
| depth_limit | No | How many folder levels deep to scan. Use 1-2 for large projects. | |
| target_path | No | Specific directory or file to analyze (relative to project root). Defaults to root. | |
| include_symbols | No | Include function/class/enum names in the tree. Defaults to true. |