Directory Tree
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.
Purpose
This skill provides access to the MCP tool directory_tree. It allows you to 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..
Parameters
The tool accepts the following parameters:
path
Required
- Type:
string - Description: No description provided
excludePatterns
Optional
- Type:
array - Description: No description provided
Usage Instructions
To use this tool:
- Prepare the parameters according to the schema above
- Invoke the MCP tool
directory_treewith the prepared parameters - Process the result returned by the tool
Example
{
"path": "example_value",
"excludePatterns": {}
}
Expected Output
The tool returns data with the following structure:
- content (
string): No description provided
Notes
- This skill requires an active MCP connection to the server providing the
directory_treetool - Ensure the MCP server is properly configured and running before attempting to use this tool
- Review the parameter requirements carefully to avoid errors