Skip to main content
Glama

list_directory

Lists files and folders in a specified directory with file sizes, enabling quick inspection of local filesystem contents.

Instructions

Lists files and directories at the specified path with file sizes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNo
directory_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

The verb 'lists' implies a read-only operation and the description says what is returned (names and sizes), which is the core behavior. However, with no annotations and no explicit statement about side effects, permissions, or error behavior, the description does not fully carry the transparency burden.

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, concise sentence with no redundant or promotional wording. It front-loads the action and then provides the key additional detail about file sizes.

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

Completeness2/5

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

The description leaves out important operational context: the meaning of 'source', whether the listing is recursive, whether hidden files are included, and what errors or permissions may arise. Without an output schema in view, the return shape beyond 'file sizes' is also unclear.

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

Parameters1/5

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

The input schema has no descriptions and the tool description only refers to 'the specified path' without clarifying which parameter is the path or what 'source' means. The 'directory_path' parameter is self-explanatory, but 'source' remains ambiguous and uncompensated.

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 resource (directory) and the action (list files and directories), and even adds the useful detail that file sizes are included. It is unambiguous enough for basic selection, though it does not explicitly contrast with sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance about when to prefer this tool over similar capabilities such as run_system_command or read_file, and no mention of recursion, hidden files, or permission requirements. The agent must infer when this listing tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.