directory_tree
Generate a JSON tree view of files and directories with details like name, type, and nested children arrays. Input a directory path to retrieve structured, readable data within allowed directories on the MCP Filesystem Server.
Instructions
Get a recursive tree view of files and directories 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 allowed directories.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
path | Yes | Path of the directory to create a tree view for |