directory_tree
Generate a structured, indented view of files and directories with customizable depth and filtering. By default, excludes common development directories like .git and node_modules, but can include them if specified. Works within allowed paths for clear project navigation.
Instructions
Get a recursive tree view of files and directories with customizable depth and filtering.
Returns a structured view of the directory tree with files and subdirectories. Directories are marked with trailing slashes. The output is formatted as an indented list for readability. By default, common development directories like .git, node_modules, and venv are noted but not traversed unless explicitly requested. Only works within allowed directories.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
depth | No | The maximum depth to traverse (0 for unlimited) | |
include_filtered | No | Include directories that are normally filtered | |
path | Yes | The path to the directory to view |