Directory tree
treeDisplays directory structure as structured nodes for AI/LLM workflows, with options to filter by glob pattern, limit depth, exclude paths, or show directories only.
Instructions
Show directory structure as a compact tree. Returns structured nodes instead of ASCII art. Use dirsOnly for directory-only view, pattern to filter by glob, maxDepth to control depth.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Root directory | |
| exclude | No | Pipe-separated patterns to exclude (default: node_modules|.git|dist|__pycache__|.venv|.next|.terraform) | |
| pattern | No | Only show files matching glob pattern | |
| dirsOnly | No | Only show directories | |
| maxDepth | No | Max depth (default 3) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dirs | Yes | ||
| files | Yes | ||
| paths | Yes | ||
| retained | No |