Skip to main content
Glama

list_directory

View directory contents in sorted order. Specify a path to retrieve files and subdirectories.

Instructions

List the entries of a directory, sorted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are present, so the description carries the full behavioral burden. It discloses only that output is sorted, without saying the sort key, whether the operation is read-only, how a missing path is handled, or whether listing recurses. For a simple read tool the risk is low, but the disclosure is thin.

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?

A single clause with zero filler, stating the action first and the ordering trait second. Nothing is padded and nothing is buried.

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?

An output schema exists, so return-format explanation is unnecessary, and the schema already supplies the path default. However, with a 1-parameter tool and no annotations, the description omits path semantics and basic read-only/error behavior, leaving it only minimally sufficient.

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

Parameters2/5

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

The single parameter 'path' has a schema default of '.' but 0% description coverage, and the description never mentions it. It does not say whether the path is relative or absolute, that it defaults to the current directory, or what happens for invalid paths, so it fails to compensate for the coverage gap.

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?

States a specific verb (List) and resource (entries of a directory) with an added ordering trait ('sorted'), which is enough to distinguish it from siblings like read_project_file or word_count. It is clear but stops short of naming scope details (recursive vs. single level, hidden files) that would fully separate it from adjacent file 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 when-to-use guidance, no statement of prerequisites, and no mention of any alternative. The agent must infer that this is the discovery step that precedes read_project_file, which is reasonable but entirely undocumented.

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