Skip to main content
Glama

list_dir

Read-onlyIdempotent

List files and folders in an allowed Linux directory up to four levels deep, marking protected files so you can inspect structure safely before changes.

Instructions

List an allowed directory (depth 1-4). Protected files are shown but marked [protected].

Input Schema

NameRequiredDescriptionDefault
pathYes
depthNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.2

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds useful context beyond annotations: depth is limited to 1-4, the directory must be 'allowed', and protected files are shown but marked '[protected]'.

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?

The description is a single, front-loaded sentence with no wasted words. Both the depth constraint and protected-file behavior are stated compactly.

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, and annotations cover the safety profile. The description covers the key non-obvious behavior—depth limits and protected files—though it leaves path semantics and usage relative to siblings implicit.

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 0%, so the description must compensate. It states the depth range 1-4, which is helpful, but does not explain the default depth or the path format beyond saying it is an 'allowed directory'.

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 uses the specific verb 'List' with the resource 'directory' and adds a depth range, making the purpose immediately clear. It does not explicitly distinguish this tool from sibling tools like search_files, but the directory-specific scope is clear enough.

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?

The description provides no guidance on when to use list_dir versus search_files, read_file, or other filesystem siblings. It implies directory listing but offers no explicit alternatives or exclusions.

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