Skip to main content
Glama

List Directory

list_dir
Read-onlyIdempotent

Inspect a remote directory's contents with sorted entries showing file type, size, and modification time. Use it to browse files on a server before reading or editing.

Instructions

List directory entries sorted by name: name, type (d dir, l symlink, f file), size in bytes, mtime in Unix seconds. Max 2000 per call; truncated=true if more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoDirectory; "~" expands to home; default: working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
pathNo
countNo
errorNo
itemsNo
has_moreNo
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes further by disclosing the 2000-entry cap and the truncation=true signal. That is a genuinely useful operational trait not present in annotations, though permission or path-error behavior is not addressed.

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 dense sentence that front-loads the action and packs output format, field list, and the truncation cap with zero filler. Every clause earns its place.

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

Completeness4/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 values need not be explained, yet the description helpfully summarizes them plus the truncation flag. It is nearly complete for a one-parameter read; only error handling for invalid paths is unaddressed.

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% and the single parameter already documents the '~' expansion and default working directory, so the schema does the heavy lifting. The description adds no additional parameter meaning, making the baseline 3 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?

States a specific verb and resource ('List directory entries') plus the sort order, and describes the exact fields returned (name, type codes, size, mtime). This clearly separates it from siblings like read_file and the exec_* family without needing to read the schema.

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?

Usage is implied by the verb and resource, but there is no explicit guidance on when to prefer this over read_file or exec_list, and no mention of error conditions such as a missing path. The agent can infer intent but is given no routing help.

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