Skip to main content
Glama

Show directory tree

directory_tree
Read-onlyIdempotent

View a recursive two-level tree of folders and files from a given path to map directory structure. For deeper levels, use list_directory.

Instructions

Recursive tree view, 2 levels deep. One level: list_directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.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, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description usefully adds the depth cap (2 levels) but says nothing about symlink handling, permission errors, or output volume for large trees.

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 compact fragments, front-loaded with the core behavior and immediately followed by the alternative. No sentence is wasted.

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 simple read-only listing tool with no output schema, the description covers the essential behavior and depth limit. It omits path format expectations and rough output shape/size, which are the remaining gaps for an agent to call it confidently.

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

Parameters2/5

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

There is one required parameter, path, with 0% schema description coverage, and the description never mentions it. It does not specify whether the path must be absolute, relative, or within an allowed directory, leaving the agent to guess.

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 the specific behavior (recursive tree view) and scope (2 levels deep), which distinguishes it from shallow-listing siblings. The verb 'view' is weak but the resource and recursion behavior are unambiguous.

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?

Explicitly routes the agent to the sibling list_directory for one-level listings, giving a clear selection rule. It does not state exclusions or prerequisites for this tool itself, so it falls short of full when/when-not coverage.

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