Skip to main content
Glama

list_directory

Generate a detailed file and directory listing for a specified path, with clear [FILE] and [DIR] labels. Use this tool to navigate and analyze directory structures efficiently within allowed directories.

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 of behavioral disclosure. It adds useful context: it distinguishes files and directories with prefixes, mentions it only works within allowed directories, and describes the output format partially. However, it doesn't cover important aspects like error handling (e.g., what happens if the path doesn't exist), performance characteristics, or whether it's read-only (implied but not stated). The description doesn't contradict any annotations since none are provided.

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?

The description is appropriately sized with three sentences that are front-loaded: the first sentence states the core purpose, the second adds output details, and the third provides context and constraints. There's minimal waste, though the phrase 'This tool is essential for...' could be considered slightly promotional rather than purely informative.

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?

Given no annotations, no output schema, and 1 parameter with low schema coverage, the description is moderately complete. It covers the purpose, output format, and constraints, but lacks details on error handling, performance, and explicit differentiation from siblings. For a tool with no structured metadata, it should do more to compensate, such as explaining return values or usage scenarios more thoroughly.

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

Parameters4/5

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

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It adds meaning by specifying that the 'path' parameter is for 'a specified path' and contextualizes it with 'Only works within allowed directories,' which helps understand valid inputs. However, it doesn't provide format details (e.g., absolute vs. relative paths) or examples. Given the low schema coverage, the description does a good job but could be more specific.

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 tool's purpose: 'Get a detailed listing of all files and directories in a specified path.' It specifies the verb ('Get') and resource ('files and directories'), and distinguishes it from siblings like 'directory_tree' by focusing on detailed listing rather than hierarchical structure. However, it doesn't explicitly differentiate from 'list_directory_with_sizes' or 'list_allowed_directories' beyond mentioning 'detailed listing' and 'allowed directories'.

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 provides some usage context: 'This tool is essential for understanding directory structure and finding specific files within a directory' and 'Only works within allowed directories.' It implies when to use it (for detailed listings) but doesn't explicitly state when to choose alternatives like 'list_directory_with_sizes' for size information or 'directory_tree' for hierarchical views. No explicit exclusions or prerequisites are mentioned beyond the allowed directories constraint.

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

Related 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/Nexus-Digital-Automations/mcp-filesystem-updated'

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