Skip to main content
Glama

List directory

list_directory
Read-onlyIdempotent

Lists files and folders with size and modification time, supports recursive depth and result limits, and skips node_modules, .git, dist, and build unless includeIgnored is true.

Instructions

List files and folders on this computer with size and mtime. Supports depth (recursive listing) and a result limit. Heavy folders (node_modules, .git, dist, build, ...) are skipped when recursing unless includeIgnored is true.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoShort human-readable explanation (1 line, in the user's language) of what you are about to do and why. Shown to the user on the approval card. Always provide when calling mutating tools.
pathNo
agentNoShort consistent identifier or display name of this agent (e.g. 'Claude · Лендинг', 'Тесты', 'Мой агент'). Used to separate tasks and route tray messages when multiple agents work in parallel.
depthNo
limitNo
showHiddenNo
includeIgnoredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

The description goes beyond basic listing by detailing a crucial behavioral trait: the automatic skipping of heavy directories like node_modules and .git by default, which is a significant operational constraint.

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 highly dense, efficient, and front-loads the primary behavior, using concise language to convey maximum technical information in just two sentences.

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?

Despite lacking an output schema, it provides strong behavioral context regarding recursive limitations and automatic file filtering. It is complete enough to guide an agent through the complexities of the file system interaction, though the return format is still unstated.

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?

Given the very low schema description coverage (29%), the description is vital as it defines the functional role of several parameters: depth (recursive), limit (max results), and includeIgnored (skipping heavy folders).

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 very specific action (list files and folders) and the metadata returned (size and mtime), providing a clear purpose.

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 description primarily lists capabilities (depth, limit) and constraints (heavy folders skipped) but does not provide explicit guidance on when this tool should be chosen over similar sibling tools like search_files.

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