Skip to main content
Glama

List Directory

file_list
Read-only

List directory contents with file name, type, size, and modification time. Optionally recurse into subdirectories with a configurable depth limit and path access controls.

Instructions

List a directory's entries: name, type, size, modification time. Optionally recursive with a depth cap. Path is checked against MACCTL_ALLOWED_PATHS/MACCTL_DENIED_PATHS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory to list.
depthNoMax recursion depth when recursive. Defaults to 5.
recursiveNoRecurse into subdirectories. Defaults to false.
maxEntriesNoCap on total entries returned. Defaults to 2000.
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description adds context about path checks against MACCTL_ALLOWED_PATHS/DENIED_PATHS, which is not present in annotations. It also mentions recursion with depth cap, enriching behavioral understanding. It does not describe error handling, but that's minor given annotations.

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 sentences, front-loaded with the core action and output fields, followed by optional recursion and a security note. Every sentence earns its place; no fluff or repetition of schema details.

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?

Given the tool's simplicity, good annotations, and full schema coverage, the description is nearly complete. It explains return fields, notes optional recursion, and mentions access-control checks. It does not describe the exact output structure or error behavior, but with no output schema, it covers the essentials 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 coverage is 100%, so parameters are already documented. The description adds some context (e.g., 'depth cap' aligns with depth parameter, 'Optionally recursive' matches recursive), but it does not provide additional syntax or format details beyond the schema. Baseline 3 is appropriate.

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 clearly states the verb ('List') and resource ('a directory's entries'), plus the specific output fields (name, type, size, modification time). This distinguishes it from sibling tools like file_read (file content), file_search (search), and file_write (write).

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 implies usage (list directory contents) but does not explicitly name alternatives or provide when-not-to-use guidance. It does not mention file_read or file_search as alternatives, leaving the AI to infer based on sibling names. This is adequate but not explicit.

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/sitharaj88/macctl'

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