Skip to main content
Glama
MCP Filesystem Server

MCP Filesystem Server

by pocho23

list_directory

Lists entries in a specified directory with each item's name, type, size, and modified date, so users can inspect filesystem contents.

Instructions

List contents of a directory with details (name, type, size, modified date)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "list_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the directory to list

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the returned fields (name, type, size, modified date), which is valuable, but says nothing about recursion depth, hidden-file handling, symlinks, ordering, pagination, or error behavior on a missing/non-directory path — the key ambiguities for a listing tool.

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

Conciseness4/5

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

One front-loaded sentence that names the operation and its output fields with no filler. It is arguably too short rather than too long, but nothing is wasted.

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

Completeness3/5

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

For a one-parameter read-only tool with no output schema, the description covers purpose and return fields, which is close to sufficient. It still leaves recursion scope and failure modes unspecified, which an agent may need before calling.

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?

Schema coverage is 100% with a single documented path parameter, so the schema already explains it. The description adds no meaning beyond the schema — nothing on absolute vs relative paths, trailing slashes, or whether a file path is rejected.

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

Purpose4/5

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

Specific verb and resource: "List contents of a directory" plus the returned details. It is distinguishable from get_file_info (single file) and search_files (query-based), though it does not name them explicitly.

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

Usage Guidelines3/5

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

Usage is implied by the resource type: call it to see what is in a directory. There is no explicit when-to-use versus get_file_info/search_files, and no stated prerequisites (e.g. whether the path must exist or be readable).

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