Skip to main content
Glama

List directory

list_directory
Read-onlyIdempotent

Use this when the user wants to see what a directory on a paired computer contains, optionally filtered by a glob.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of the directory to list.
depthNoDirectory levels to list, from 1 to 5. Default 1.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
patternNoOptional glob that filters file names, such as "*.log". Directories are always listed.

Output Schema

NameRequiredDescriptionDefault
dataNoOptional structured result data for follow-up reasoning and tool calls.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.1/5.0
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 fully covered. The description adds useful context about the paired computer scope and optional glob filtering, but does not go further to describe hidden-file behavior, sorting, or error conditions.

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 one focused sentence with no filler. It front-loads the usage trigger and includes the key optional behavior, making it immediately actionable for an agent.

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?

For a low-complexity list operation, the description is complete when combined with the 100%-covered schema, the safety annotations, and the existing output schema. The agent has enough information to select and invoke the tool correctly without missing critical context.

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 description coverage is 100%, so all four parameters are already documented adequately in the schema. The main description adds only the high-level notion of an optional glob filter, which does not meaningfully extend what the schema already provides.

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 states a specific verb and resource: it tells the agent to use this tool when the user wants to see what a directory on a paired computer contains. This clearly distinguishes it from sibling tools like list_devices or read_file by focusing on directory listing on a remote/paired machine.

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 usage context with 'Use this when the user wants to see what a directory...contains.' However, it does not explicitly state when not to use it or name alternative tools for similar tasks, so it misses the full when-not/alternatives guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources