Skip to main content
Glama

list_directory

List contents of a directory one level deep to explore project structure before reading or writing files.

Instructions

List the contents of a directory (one level deep). Use this to explore project structure before reading or writing files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dir_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description must disclose behavior. It mentions one-level depth but omits details like whether hidden files are included, error handling for nonexistent paths, or output format. The presence of an output schema mitigates some gaps, but more explicit behavioral traits would improve transparency.

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 consists of two concise sentences, with the purpose stated first followed by a usage recommendation. No unnecessary words, and the structure is efficient for quick comprehension.

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?

Given the tool's simplicity (one parameter, no complex logic), the description covers the core purpose and usage context. However, it lacks details on output format (though output schema exists) and edge cases, making it slightly incomplete for an agent needing full behavioral expectations.

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

Parameters2/5

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

The input schema has one parameter (dir_path) with 0% schema description coverage. The description provides no additional details about the parameter (e.g., path format, whether absolute or relative, what happens if invalid). The tool name implies its purpose, but the description should add semantic value beyond the schema.

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 lists directory contents one level deep, using a specific verb ('List') and resource ('directory'). It effectively distinguishes from siblings like read_file and write_file by specifying the scope and providing a usage context.

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 advises using this tool before reading or writing files, providing a clear context for when to use it. However, it does not explicitly state when not to use it or mention alternative tools for deeper listing or file content retrieval.

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/ahmad-zurih/ds-mcp-server'

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