Skip to main content
Glama
tim-akkio

MCP Server Framework

by tim-akkio

list_directory

Lists the contents of a specified directory to view files and subdirectories. Requires proper path configuration for secure access.

Instructions

    List contents of a directory.

    Requires MCP_ALLOWED_PATHS to be configured with permitted directories.

    Args:
        path: Directory path to list

    Returns:
        Formatted directory listing or error message
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the MCP_ALLOWED_PATHS requirement (important security context) and indicates it returns either formatted listings or error messages. However, it doesn't describe format details, pagination, sorting, or what happens with non-directory paths - leaving gaps for a mutation-free tool.

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 perfectly structured and concise: purpose statement first, then prerequisite, then parameter documentation, then return information. Every sentence earns its place with no wasted words, and it's appropriately sized for a single-parameter tool.

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 moderate complexity (directory listing with path restrictions), no annotations, and the presence of an output schema (which handles return value documentation), the description is reasonably complete. It covers purpose, prerequisites, parameters, and return outcomes. A 5 would require more behavioral details about listing format or edge cases.

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?

The schema description coverage is 0%, so the description must compensate. It provides the single parameter 'path' with a clear semantic meaning ('Directory path to list'), which is valuable beyond the schema's basic type information. Since there's only one parameter and the description explains it adequately, this earns a 4 rather than 5 (which would require format examples or constraints).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with 'List contents of a directory' - a specific verb ('List') and resource ('directory contents'). It distinguishes from siblings like 'read_file' (reads file content) and 'get_file_info' (gets metadata). However, it doesn't explicitly contrast with all siblings, so it's not a perfect 5.

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 provides clear context about when to use this tool ('List contents of a directory') and includes an important prerequisite about MCP_ALLOWED_PATHS configuration. It doesn't explicitly mention when NOT to use it or name specific alternatives among the siblings, so it falls short of a 5.

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/tim-akkio/mcp-server'

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