Skip to main content
Glama

MCP Filesystem Server

MIT License
44
  • Apple
  • Linux

directory_tree

Generate a recursive tree view of files and directories with customizable depth, filters, and output formats. Ideal for analyzing complex directory structures efficiently.

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

NameRequiredDescriptionDefault
exclude_patternsNo
formatNotext
include_filesNo
max_depthNo
pathYes
patternNo

Input Schema (JSON Schema)

{ "properties": { "exclude_patterns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Exclude Patterns" }, "format": { "default": "text", "title": "Format", "type": "string" }, "include_files": { "default": true, "title": "Include Files", "type": "boolean" }, "max_depth": { "default": 3, "title": "Max Depth", "type": "integer" }, "path": { "title": "Path", "type": "string" }, "pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Pattern" } }, "required": [ "path" ], "title": "directory_treeArguments", "type": "object" }

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