Skip to main content
Glama
l0kifs

project-explorer-mcp

by l0kifs

dir_tree

Get a compact file and folder tree up to a specified depth for a quick overview of project structure.

Instructions

Returns a compact file and folder tree with depth limitation.

Agent usage guidelines: - Use this tool when you need to get a quick overview of the file and folder structure of a project or directory. - Use when you need to display or analyze the hierarchy of files and folders up to a certain depth. - Do not use for reading file contents or for non-existent/relative paths.

Path requirements: - The path must not contain URL-encoding (e.g., '%'). - The path must be absolute. - The path must exist on disk. Example paths: - Windows: "C:\Users\User\project" - Linux: "/home/user/project"

Args: root_path (str): Absolute path to the root directory. max_depth (int): Maximum nesting depth. Default is 1. output_format (str | None): Output format ('json' or 'markdown'). Defaults to server setting (markdown by default).

Returns: str | dict: File and folder tree in the requested format or error dict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_depthNo
root_pathYes
output_formatNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the depth limitation, output format options, and path requirements (absolute, no URL-encoding, must exist). It also notes that an error dict is returned on failure, which is transparent. However, it doesn't explicitly state that this is a read-only operation with no side effects, though that is implied by the nature of the tool.

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 well-structured with clear sections (description, usage guidelines, path requirements, example paths, args, returns). Each sentence adds value and there is no irrelevant information. It is appropriately sized for a tool with multiple parameters and usage constraints, front-loading the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 params, one required) and the presence of an output schema, the description is complete. It covers purpose, usage guidelines, path constraints, parameter semantics, and return behavior. The mention of error handling and output formats rounds out the context, so agents have all necessary information for correct invocation.

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 description coverage is 0%, but the description compensates thoroughly with an Args section explaining each parameter: root_path (absolute path), max_depth (nesting depth, default 1), and output_format (json/markdown, default derived from server). It provides example paths for both Windows and Linux, adding meaning beyond the schema's basic type definitions.

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 the tool returns a compact file and folder tree with depth limitation. It specifies the resource (file/folder tree) and distinguishes it from siblings like python_outline and markdown_outline, which focus on source code outlines rather than 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?

The description provides explicit agent usage guidelines: when to use (quick overview, hierarchy analysis) and when not to use (reading file contents, non-existent/relative paths). This covers both positive use cases and exclusions, making it clear how to select this tool over alternatives.

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/l0kifs/project-explorer-mcp'

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