Skip to main content
Glama

list_directory

Read-only

Retrieve directory contents with file sizes and modification times without running a shell command. Specify a path, include hidden entries, and set a limit for results.

Instructions

List files, directories, and symlinks with size and modification time, without running a shell command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoDirectory path; defaults to the workspace root.
max_entriesNoMaximum returned entries.
include_hiddenNoInclude names beginning with a dot; defaults to false.
Behavior4/5

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

Annotations already mark this as read-only and non-destructive. The description adds useful behavioral context beyond those annotations by specifying that it returns files, directories, symlinks, size, and modification time, and that it does not execute a shell command. No contradiction with annotations exists.

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 a single, tightly worded sentence that front-loads the core action and resource. It includes the most important differentiator ('without running a shell command') without any wasted words.

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

Completeness5/5

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

This is a simple listing tool with fully documented optional parameters and read-only annotations. The description sufficiently covers what the tool returns (files, directories, symlinks, size, modification time) and why it should be used over a shell command, so the agent has enough information to invoke it correctly.

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 already provides 100% parameter documentation, covering path, max_entries, and include_hidden with descriptions and defaults. The tool description does not add any additional parameter semantics, so the baseline score of 3 is appropriate.

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 uses a specific verb ('List') and resource ('files, directories, and symlinks'), and adds distinguishing details like size and modification time. It also explicitly differentiates itself from shell-based approaches, making it easy for an agent to understand what this tool does.

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 phrase 'without running a shell command' gives clear context for when to prefer this tool over shell_command. It doesn't explicitly name other alternatives like find_files, but the listing scope and metadata details make the intended use case clear.

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/JonusNattapong/ChatGPTMCP'

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