Skip to main content
Glama

list_dir

List filtered directory contents by specifying a path and optional glob pattern, returning file names, paths, types, modification times, and sizes without altering the filesystem.

Instructions

Bekijk gefilterde directory-inhoud zonder het bestandssysteem te wijzigen.

path moet een bestaande directory onder allowed_read_dirs zijn. pattern gebruikt pathlib-globsyntaxis (* standaard; gebruik bijvoorbeeld **/* voor recursieve resultaten). Standaard worden alleen bestanden opgenomen; zet include_dirs=True voor directories en include_files=False om bestanden uit te sluiten. max_items gebruikt standaard de geconfigureerde limiet en wordt begrensd tot 1–max_items uit de serverconfiguratie. De tool retourneert per item naam, absoluut pad, type, wijzigingstijd en voor bestanden de grootte; ontoegankelijke items bevatten een eigen foutmelding. Resultaten gebruiken de standaard {success, data, error, meta}-response. Gebruik read_file, head of tail om vervolgens bestandsinhoud te lezen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patternNo*
max_itemsNo
include_dirsNo
include_filesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations present, so description fully covers safety (no modifications), behavior (error handling for inaccessible items), return data per item (name, path, type, modification time, size), and response format. This is thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections, but slightly verbose (e.g., 'Resultaten gebruiken de standaard...'). Still, every sentence adds value; no redundancy.

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?

Given the output schema exists and description explains return fields and response structure, the tool is fully documented. All key behaviors and constraints are covered for an agent to correctly select and invoke it.

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

Parameters5/5

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

Schema description coverage is 0%, but description adds meaning for all 5 parameters: path constraints, pattern glob syntax, include_dirs/include_files toggles, max_items bounds. This fully compensates for the schema's lack of descriptions.

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 explicitly 'Bekijk gefilterde directory-inhoud zonder het bestandssysteem te wijzigen' (view filtered directory contents without modifying filesystem). Differentiates from siblings like read_file, head, tail which read file contents.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Specifies prerequisites: path must be an existing directory under allowed_read_dirs. Provides pattern syntax guidance. Implicitly suggests use of read_file, head, tail for subsequent content reading, but lacks explicit when-not-to-use statements for other siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gerard-kanters/mcp-linux-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server