Skip to main content
Glama

list_directory

Read-only

List files and folders at a given path, one level deep, relative to the project root or current directory. Use it to inspect project structure before reading or editing files.

Instructions

List directory contents at path (relative to PROJECT_MCP_ROOT or cwd). One level only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With readOnlyHint=true already covering the safety profile, the description adds real behavioral context: path resolution semantics (relative to PROJECT_MCP_ROOT or cwd) and the non-recursive depth constraint. It does not discuss error behavior for missing directories, but the output schema covers return shape.

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?

Two tight sentences, zero filler, with the core action front-loaded and the depth constraint immediately after. Every clause earns its place.

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?

An output schema exists, so return values need no explanation, and readOnlyHint covers the mutation question. Combined with the stated path basis and depth limit, the definition is sufficient to call correctly; only edge-case behavior on invalid paths is unaddressed.

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 for the single path parameter, and it does: it explains what the path is resolved against. The implicit default (".") is documented in the schema itself but the resolution basis is only in the description.

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?

States a specific verb and resource ("List directory contents") and adds two scoping qualifiers: path is relative to PROJECT_MCP_ROOT or cwd, and listing is one level deep only. That is enough for an agent to know it is a non-recursive listing rather than a recursive search, though it never names a sibling like search_files to make differentiation explicit.

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?

Usage is implied rather than stated: "One level only" signals that recursive or pattern-based discovery belongs elsewhere, which nudges toward search_files without saying so. No explicit when-to-use, when-not-to-use, or prerequisite statements are given.

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