Skip to main content
Glama

Filesystem MCP Server

list_directory

Retrieve and organize directory contents with type annotations. Specify the path to list files and directories, sorted alphabetically, with clear '[DIR]' or '[FILE]' labels. Paths must adhere to allowed directory roots.

Instructions

List the contents of a directory with type annotations.

Args: path (str): Directory path to list (absolute or relative to allowed directories)

Returns: str: Newline-separated list of entries with '[DIR]' or '[FILE]' prefixes, or error message if failed

Note: - Path must be within allowed directory roots - Fails if path is not a directory - Entries are sorted alphabetically - Format: '[DIR] dirname' or '[FILE] filename'

Input Schema

NameRequiredDescriptionDefault
pathYes

Input Schema (JSON Schema)

{ "properties": { "path": { "title": "Path", "type": "string" } }, "required": [ "path" ], "type": "object" }
Install Server

Other Tools from Filesystem MCP Server

Related Tools

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/Preston-Harrison/fs-mcp-py'

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