Skip to main content
Glama

list_directory

List directory contents to retrieve file and folder names, sizes, and timestamps. Get detailed file information for any specified path.

Instructions

List contents of a directory. Returns file/folder names, sizes, and timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory path to list

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description must carry the full behavioral burden. It discloses the output fields (names, sizes, timestamps), but does not mention hidden files, recursion depth, path-error behavior, or permissions. This is a partial but not complete behavioral disclosure.

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, tightly worded sentence that states the action and the expected return content. Every word adds value, and there is no fluff or redundancy.

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?

For a simple tool with one clearly documented parameter and no output schema, the description adequately covers what the tool does and what it returns. It is missing minor edge-case context such as recursion or error behavior, but not enough to make the description materially incomplete.

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?

The input schema already fully documents the only parameter, path, with the description 'Directory path to list' (100% schema description coverage). The tool description adds no further semantic detail beyond what the schema provides, so the baseline score of 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 uses a specific verb and resource: 'List contents of a directory.' It also states the return values (file/folder names, sizes, timestamps), which clearly differentiates it from sibling tools like read_file, search_files, and get_file_info.

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 purpose is clear enough that an agent knows to use this tool when it needs to enumerate directory contents. It does not explicitly mention alternatives or when not to use it, but the context is unambiguous, especially among the sibling file-operation tools.

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

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/For-Sunny/darkside-mcp'

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