Skip to main content
Glama

read_directory

List files and directories within allowed roots to discover files without requiring full absolute paths from the user.

Instructions

List files and directories within allowed roots. Use this to discover files without requiring full absolute paths from the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to directory (relative to root or absolute within root)
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It discloses that the tool works 'within allowed roots,' implying access restrictions. However, it does not describe the return format, error handling, or any side effects. For a read-only list tool, this is adequate but not exceptional.

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?

Two concise sentences. The first states the primary function, the second provides usage guidance. No unnecessary words. Front-loaded effectively.

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 tool with a single parameter and no output schema, the description covers the main purpose and usage context. It does not detail the return structure, but the tool is straightforward. The many sibling tools are mostly unrelated, so differentiation is not critical here.

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 already has a description for the 'path' parameter: 'Path to directory (relative to root or absolute within root).' The description adds nothing new beyond implying usability without absolute paths. Since schema description coverage is 100%, the baseline is 3.

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?

Clearly states the tool lists files and directories within allowed roots. The verb 'List' and resource 'files and directories' are specific. It distinguishes from siblings by highlighting the benefit of not requiring absolute paths, which is unique among the many sibling tools that seem to focus on analysis or memory operations.

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?

Provides explicit context: 'Use this to discover files without requiring full absolute paths from the user.' This tells the agent when to use the tool. However, it does not mention when not to use it or provide alternatives, which would improve the score further.

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/tosin2013/documcp'

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