Skip to main content
Glama

List a directory

list_directory
Read-onlyIdempotent

Lists directory entries with name, type, and size while honoring the path allowlist for safe access.

Instructions

List the entries (name, type, size) of a directory. Honours the path allowlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory path (supports ~ for home).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds meaningful behavioral context beyond annotations: it discloses the path allowlist restriction and specifies the return entries (name, type, size). It stops short of describing error behavior, but the annotation coverage lowers the bar.

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 compact sentences: the first front-loads the action and output, the second states the key constraint. No filler or redundant repetition of the schema.

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

Completeness5/5

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

For a single-parameter, read-only listing tool with strong annotations and no output schema, the description is complete enough for correct invocation. It covers what the tool returns, the path allowlist, and the required input. Minor omissions like sorting or hidden-file handling are not essential.

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

Parameters4/5

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

The schema already documents path with minLength and ~ support (100% coverage), so the baseline is 3. The description adds the allowlist restriction, which is a valuable constraint on valid path values not present in the schema, pushing it above baseline.

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?

The description states a specific verb, 'List', and a clear resource: directory entries including name, type, and size. This unambiguously differentiates it from siblings like read_file (file contents) and list_processes (running processes).

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 intended use is implied by the name and action but never made explicit. There is no mention of when to choose this tool over alternatives, no exclusion criteria, and no routing to a sibling. The allowlist constraint hints at a condition but does not guide usage decisions.

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