Skip to main content
Glama

tree

Visualize directory layout with configurable depth. Get an instant overview of project organization to know where to search before starting.

Instructions

USE INSTEAD OF LS/FIND FOR STRUCTURE. Visualize directory layout without multiple commands.

Get instant overview of project organization. Configurable depth prevents overwhelming output in deep repos.

Use this first when exploring a new codebase - shows you where to look before you start searching.

Perfect for: "Show me the project structure", "What's in repos/jenkins/", "How is src/ organized?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasoningYesExplain why you need to see the directory structure
pathNoDirectory to show. Defaults to current working directory
depthNoMaximum depth to traverse. Default: 3
include_hiddenNoInclude hidden files and directories (dotfiles). Default: false
dirs_onlyNoOnly show directories, not files. Default: false
Behavior4/5

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

No annotations provided, so description carries full burden. It describes configurable depth to prevent overwhelming output, default path behavior, and options for including hidden files or directories only. It implies read-only nature but does not explicitly state non-destructiveness.

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?

The description is front-loaded with the key instruction "USE INSTEAD OF LS/FIND FOR STRUCTURE." It is informative but slightly verbose with multiple sections; could be more concise.

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?

Given 5 parameters and no output schema, the description covers essential usage: purpose, when to use, and configuration. It lacks explanation of output format, but the tool's behavior (tree output) is conventionally understood.

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?

Schema description coverage is 100%, so baseline is 3. The description does not add additional meaning beyond what the schema already provides for each parameter; it only gives usage context.

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 clearly states "USE INSTEAD OF LS/FIND FOR STRUCTURE" and "Visualize directory layout without multiple commands," specifying the verb and resource. It distinguishes from sibling tools like fuzzy_find, search_content, and search_files by focusing on directory structure.

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

Usage Guidelines5/5

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

Explicitly says "Use this first when exploring a new codebase," implying when to use. It also provides when-not-to-use by contrasting with other tools and gives example queries like "Show me the project structure."

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/elad12390/file-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server