Skip to main content
Glama

List a directory

list_dir
Read-onlyIdempotent

Lists files and subdirectories with type, size, modification time, and permissions, skipping hidden entries unless show_hidden=true. Symlinks are reported but not followed.

Instructions

List files and subdirectories with type, size, modification time and permissions. Symlinks are reported but not followed. Hidden entries are skipped unless show_hidden=true.

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory path. Default $HOME.
max_entriesNoDefault 500.
show_hiddenNoInclude names starting with a dot. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, yet the description adds real behavioral detail: symlinks are reported but not followed, and dot-entries are excluded unless show_hidden=true. It omits what happens on a nonexistent path or when max_entries is hit (silent truncation vs error), which is the remaining meaningful gap.

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?

Three short sentences, front-loaded with what is listed and what is returned, then the two behavioral caveats. No filler or redundancy.

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?

With no output schema, the description usefully names the returned fields (type, size, modification time, permissions) and covers symlink and hidden-entry behavior. Truncation at max_entries and error conditions remain undisclosed, which is a modest but real omission for a listing tool.

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 description adds essentially nothing beyond it; the show_hidden note merely restates the schema default. It gives no additional meaning for max_entries, such as whether exceeding it truncates output or errors.

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 (files and subdirectories) and enumerates the metadata returned, which distinguishes it from a search or stat tool. It does not explicitly contrast itself with siblings like search_files or stat_path, so an agent must infer that boundary.

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 non-recursive, metadata-returning behavior, but there is no explicit statement of when to prefer this over search_files or stat_path, and no mention of prerequisites such as the path needing to exist and be readable.

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