Skip to main content
Glama

List local directory

list_directory
Read-onlyIdempotent

List files and folders in a directory to view their type, size, and last modified time. Use this to identify paths and select files for editing or operations.

Instructions

List files and folders with type, size, and modified time. Use before guessing paths or choosing files to edit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo/root
maxDepthNo
recursiveNo
maxEntriesNo
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is well-covered. The description adds the behavioral trait that it returns file type, size, and modified time, but does not disclose important details like whether symbolic links are followed, error handling for invalid paths, or behavior when the path is a file. Since annotations cover the core safety aspects, a 3 is appropriate.

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 two sentences, front-loads the purpose and typical output, and uses the second sentence to provide usage guidance. Every sentence is necessary and adds value with no redundant or filler content.

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 is a simple directory listing with good annotations (readOnlyHint, idempotentHint), no output schema, and moderate complexity (4 parameters), the description covers the core functionality and usage context. It does not explain the return format precisely (e.g., whether paths are absolute/relative), but the purpose and output fields (type, size, modified time) are clear. With strong annotations and self-explanatory parameters, the description is largely complete for an agent to use correctly.

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?

Schema description coverage is 0%, so the description must compensate. The description does not explicitly describe each parameter's semantics, but it implies that 'path' controls the directory to list, and 'recursive' and 'maxDepth' affect depth of listing (especially with the hint to use recursively). However, it does not explain 'maxEntries'. Despite the gap, the tool's parameters are self-explanatory from their names and schema defaults, and the description provides enough context for correct invocation.

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 'List files and folders with type, size, and modified time', specifying the verb (list), resource (files and folders), and output details (type, size, modified time). It distinguishes from sibling tools like read_file (read content), write_file (write content), and path_info (path metadata) by focusing on directory listing with file metadata.

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?

The description explicitly says 'Use before guessing paths or choosing files to edit', which provides clear context for when to use this tool (before path guessing or file selection). However, it does not explicitly mention when not to use it or name specific alternatives for other use cases (e.g., search_files for finding files by name).

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/yungsuk53-pixel/unlimited-agent'

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