Skip to main content
Glama

Filesystem MCP Server

list_files

Query and list files and directories within a specified path. Supports recursive listing and limits entries with the maxEntries parameter for efficient directory navigation on the Filesystem MCP Server.

Instructions

Lists files and directories within the specified directory. Optionally lists recursively and returns a tree-like structure. Includes an optional maxEntries parameter (default 50) to limit the number of items returned.

Input Schema

NameRequiredDescriptionDefault
includeNestedNoIf true, list files and directories recursively. Defaults to false (top-level only).
maxEntriesNoMaximum number of directory entries (files + folders) to return. Defaults to 50. Helps prevent excessive output for large directories.
pathYesThe path to the directory to list. Can be relative or absolute (resolved like readFile).

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "includeNested": { "default": false, "description": "If true, list files and directories recursively. Defaults to false (top-level only).", "type": "boolean" }, "maxEntries": { "default": 50, "description": "Maximum number of directory entries (files + folders) to return. Defaults to 50. Helps prevent excessive output for large directories.", "exclusiveMinimum": 0, "type": "integer" }, "path": { "description": "The path to the directory to list. Can be relative or absolute (resolved like readFile).", "minLength": 1, "type": "string" } }, "required": [ "path" ], "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/cyanheads/filesystem-mcp-server'

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