directory_tree
Generate a JSON-structured recursive tree view of files and directories from a specified path. Each entry includes 'name', 'type', and 'children' (for directories), aiding in visualizing project structures.
Instructions
Get a recursive tree view of files and directories in the specified path as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. Only works within the allowed directory. Useful for understanding project structure. Example: Enter '.' for current directory, or 'src' for a specific directory.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
path | Yes | Root directory to analyze |