Skip to main content
Glama
redf0x1

MCP-Server-Filesystem

by redf0x1

list_directory

Get a detailed listing of files and directories in a specified path, with [FILE] and [DIR] prefixes to distinguish them.

Instructions

Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It adds useful behavioral details: results are prefixed with [FILE] and [DIR], and the tool is restricted to allowed directories. However, it omits other potentially relevant behaviors like recursion, hidden files, or error handling for invalid paths, so transparency is moderate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (4 sentences) and each sentence earns its place: purpose, output format, usage context, and a critical constraint. There is no fluff or redundant information, and it is well-structured with front-loaded purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description covers the main aspects: what it does, what results look like, and a usage constraint. It is mostly complete, though it could mention whether the listing is recursive or only immediate children, but given the tool's simplicity, it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0% with only a single 'path' parameter. The description compensates somewhat by implying the path should be a directory ('...in a specified path') and adding the constraint about allowed directories. However, it does not clarify whether the path must be absolute, relative, or what happens for nonexistent paths, so the compensation is partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Get a detailed listing of all files and directories in a specified path.' This is a specific verb+resource that uniquely identifies the tool as a directory listing operation, distinguishing it from siblings like read_file (content) or search_files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context on when to use the tool: 'essential for understanding directory structure and finding specific files within a directory.' It also notes the constraint 'Only works within allowed directories,' giving clear usage boundaries. It does not explicitly name alternatives, but the purpose is clear enough for an agent to choose it appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/redf0x1/MCP-Server-Filesystem'

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