Skip to main content
Glama

explore_directory

List files and subdirectories at a given path to navigate a project tree level by level without indexing. Set depth and item limits to inspect directory contents.

Instructions

Lists files and subdirectories at the given path. Very fast, no indexing needed.
Use this to navigate the project tree level by level.

Args:
    path: Directory path relative to project root (use "." for root).
    depth: How many levels deep to show (1-3). Default 1.
    max_items: Maximum items to return. Default 100.

Returns:
    Tree-like listing of the directory contents.

Input Schema

NameRequiredDescriptionDefault
pathNo.
depthNo
max_itemsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses 'very fast, no indexing needed' and the tree-shaped return, but says nothing about behavior on missing/invalid paths, hidden-file handling, truncation when max_items is hit, or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core statement, then scannable Args/Returns blocks. The Returns section is mild redundancy since an output schema exists, but the rest 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?

For a 3-param, all-optional read tool with an output schema, the description covers purpose, parameters, constraints, and the key performance trait. Only edge-case behavior (missing path, truncation, hidden files) is left unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description fully compensates: it explains that path is relative to project root with '.' for root, bounds depth to 1-3 (a constraint absent from the schema, which has no enum or maximum), and gives max_items semantics plus its default.

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 ('Lists files and subdirectories at the given path') and adds a scope hint ('navigate the project tree level by level'). It does not name any sibling (e.g. search_codebase, get_project_overview) as the alternative, so differentiation is implied rather than explicit.

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?

'Use this to navigate the project tree level by level' gives clear usage context, and 'no indexing needed' implicitly positions it against index-dependent search siblings. No explicit when-not-to-use or named alternative is given.

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