Skip to main content
Glama

read_directory

List files and directories within allowed paths to discover content without requiring full absolute paths from users.

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)
Behavior2/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 mentions the tool lists files 'within allowed roots' which hints at access restrictions, but doesn't disclose important behavioral traits like whether this requires specific permissions, what format the output takes, whether it's paginated, error conditions, or rate limits. For a read operation with zero annotation coverage, this is a significant gap.

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 perfectly concise with two sentences that each earn their place - the first states the core functionality, the second provides usage guidance. It's front-loaded with the primary purpose and wastes no words.

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 the tool's moderate complexity (single parameter read operation), 100% schema coverage, but no annotations and no output schema, the description is minimally adequate. It covers the basic purpose and usage context but lacks important behavioral details about output format, error handling, and access constraints that would be needed for complete understanding.

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 input schema has 100% description coverage, so the schema already documents the single 'path' parameter adequately. The description adds marginal value by clarifying that paths can be 'relative to root or absolute within root' (which the schema description also states), but doesn't provide additional semantic context beyond what's in the structured data.

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's purpose with specific verbs ('List files and directories') and resource scope ('within allowed roots'), distinguishing it from siblings by focusing on file system exploration rather than analysis, validation, or documentation tasks.

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 provides clear context for when to use this tool ('to discover files without requiring full absolute paths from the user'), which implicitly suggests it's for exploration when users don't know exact paths. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the many siblings.

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