Skip to main content
Glama

list_directory

Retrieve a single directory level as structured name/type entries, including dotfiles, without recursing into subdirectories. Use it to inspect immediate contents deterministically.

Instructions

List one directory level as deterministic structured name/type entries, including dotfiles. This tool is intentionally non-recursive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoBase directory. Defaults to the agent user home directory.
pathNoDirectory path. Relative paths are resolved against cwd..

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations present, the description carries the full behavioral burden. It usefully discloses non-recursiveness, dotfile inclusion, and a deterministic name/type output shape, but says nothing about permission requirements, error behavior on a missing path, or symlink handling.

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 short sentences, zero filler, with the key scoping constraint ('one directory level') front-loaded. Every clause earns its place.

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?

There is no output schema and no annotations, so the description has to carry return-value and behavior disclosure. It hints at a structured name/type result and the dotfile/non-recursive behavior, but omits error cases and permissions, leaving gaps for a tool with zero structured support.

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?

Schema description coverage is 100%, so both cwd and path are already fully documented in the schema, including relative-path resolution against cwd. The description adds no parameter-level detail beyond what the schema provides, so the baseline 3 applies.

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 gives a specific verb (list) and resource (directory contents) and pins down the scope with 'one directory level' plus 'including dotfiles'. It does not explicitly differentiate from the unrelated listing sibling workspace_list, but no sibling actually overlaps this functionality, so the purpose is unambiguous.

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

Usage Guidelines3/5

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

The phrase 'intentionally non-recursive' implies the usage context, but the description never states when to reach for this tool versus alternatives or what conditions make it the wrong choice. Usage is left to inference.

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