Skip to main content
Glama

directory_tree

Generate a hierarchical tree view of files and directories in JSON format. Each entry includes 'name', 'type' (file/directory), and 'children' for directories, providing a structured overview of the specified path within allowed directories.

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

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nexus-Digital-Automations/mcp-filesystem-updated'

If you have feedback or need assistance with the MCP directory API, please join our Discord server