Skip to main content
Glama

list_directory

Read-only

Lists up to 200 entries in an approved folder to inspect permitted workspace contents; provide an absolute path under configured approved roots.

Instructions

List up to 200 entries in a permitted folder

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "list_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path under configured approved roots

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description's only added behavioral fact is the 200-entry cap, which is useful but leaves open what happens beyond 200 entries, whether truncation is signaled, and what order entries return in.

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?

One short sentence with the scope limit front-loaded and no filler. Every element, the action, the 200 cap, and the permission constraint, earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read tool with full annotations this is close to adequate, but with no output schema the description should at least sketch the returned entry shape or how the 200-entry cap is surfaced, since an agent cannot learn that elsewhere.

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?

With a single parameter at 100% schema description coverage, the schema already explains that path must be absolute and under configured approved roots. The description's "permitted folder" merely restates that constraint rather than adding syntax, edge-case, or validation detail.

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?

A specific verb plus resource ("List ... entries in a ... folder") with a stated cap of 200 and a permission qualifier. It is distinguishable from write_text_file, read_text_file, and search_text by being a directory enumeration, though it never names those alternatives explicitly.

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 phrase "in a permitted folder" implies a prerequisite (the path must be under approved roots) but the description gives no when-to-use versus when-to-use-something-else guidance, such as pairing with search_text for recursive lookup or read_text_file for contents.

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