Skip to main content
Glama

list_directory

List directory entries with metadata. Enable recursion and set max depth to explore subdirectories, including hidden files when needed.

Instructions

List directory contents with metadata. Supports recursive listing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory path.
max_depthNoMax recursion depth. Default: 5.
recursiveNoRecurse into subdirs. Default: false.
show_hiddenNoInclude hidden entries. Default: false.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  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?

With no annotations, the description carries the full burden of explaining behavior. It states recursive support, but that is already visible in the schema. It does not disclose whether this is a read-only operation, what happens on missing paths, whether sorting is applied, or what 'metadata' is included.

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 two short sentences with no wasted words, and the core purpose is front-loaded. Every sentence contributes meaning without unnecessary elaboration.

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

Completeness2/5

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

The tool has no output schema, so the description should explain what the returned listing contains, but it only says 'with metadata' without specifying which metadata. It also omits default behavior details, error handling, and path semantics, leaving several important usage questions unanswered.

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 description coverage is 100%, so the schema already documents all four parameters. The description adds no extra parameter meaning beyond repeating the recursive capability, so the baseline of 3 is appropriate.

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?

The description clearly states the operation ('List directory contents') and the resource (a directory), so an agent can understand the basic purpose. It also mentions metadata and recursive listing, which helps. However, it doesn't explicitly differentiate this tool from close siblings like get_file_info or find_files.

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?

The description implies when to use this tool—when a directory listing is needed—but provides no guidance about when not to use it or which sibling might be a better alternative. No exclusions or contextual conditions are discussed.

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

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/YOUSEFISLAM-dev/qwen-mcp'

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