Skip to main content
Glama
safurrier

MCP Filesystem Server

directory_tree

Generate and visualize a recursive directory structure with customizable depth, file inclusion, and pattern filtering. Supports text or JSON output for clear file hierarchy representation.

Instructions

Get a recursive tree view of files and directories.

Args: path: Root directory max_depth: Maximum recursion depth include_files: Whether to include files (not just directories) pattern: Optional glob pattern to filter entries exclude_patterns: Optional patterns to exclude format: Output format ('text' or 'json') ctx: MCP context Returns: Formatted directory tree

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exclude_patternsNo
formatNotext
include_filesNo
max_depthNo
pathYes
patternNo

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/safurrier/mcp-filesystem'

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