Skip to main content
Glama
isina-nej
by isina-nej

Directory tree

directory_tree
Read-only

Render an ASCII tree of a directory structure to visualize nested folders and files, with options to set depth and limit entries for clarity.

Instructions

Render an ASCII tree of a directory (noise dirs hidden).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo~
depthNo
max_entriesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds the useful behavioral detail that noise directories are hidden, but it does not define what counts as noise or how depth and max_entries affect the output. This is meaningful but incomplete behavioral disclosure.

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 a single, front-loaded sentence that states the action, output format, and the key filtering behavior. There is no redundant or filler wording. Every part of the sentence 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 simple read-only tool, the description is mostly adequate, and the presence of an output schema reduces the need to describe return values. However, the ambiguity of 'noise dirs hidden' and the lack of usage differentiation from list_directory are noticeable gaps. An agent could still invoke the tool correctly, but may misjudge what is omitted from the output.

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

Parameters1/5

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

Schema description coverage is 0%, and the description provides no explanation of path, depth, or max_entries. An agent must rely solely on the parameter names and defaults in the schema, which is thin for a tool with three parameters. The description adds no value beyond what the schema already exposes.

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 uses a specific verb ('Render') and resource ('ASCII tree of a directory'), making the tool's function immediately clear. The parenthetical 'noise dirs hidden' adds a meaningful behavioral qualifier. This distinguishes it from sibling tools like list_directory, which would not produce a tree structure.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use directory_tree versus alternatives such as list_directory, find_files_tool, or file_search. There is no mention of when the tree format is preferable, nor any exclusions or conditions. Usage must be inferred entirely from the tool name and one-line description.

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

Deploy Server

Other Tools