Skip to main content
Glama

get_tree_directory_from_path

Generate a formatted directory tree filtered by programming language, displaying line counts for each file.

Instructions

Generate a tree directory structure as a string, excluding files and directories
based on the specified programming language using regex patterns.

Args:
    path: The root path to start generating the tree from
    language: The programming language to filter files. Possible values: ["python", "javascript", "java", "go", "ruby", "rust", "csharp", "generic"]
    
Returns:
    A formatted string representing the directory tree with line counts for each file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
languageYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool generates a string and filters files, but it does not mention side effects, permissions, or whether the operation is read-only. The behavioral coverage is partial but not misleading.

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 relatively concise, with a clear main sentence followed by structured Args and Returns sections. It is front-loaded with the core purpose, though the Args section repeats the parameter names redundantly.

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 the tool's simplicity (2 params, no output schema), the description adequately covers purpose, parameters, and return format. It lacks mention of error handling or limitations, but for a straightforward generation tool, this is sufficient.

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

Parameters4/5

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

Schema coverage is 0%, so the description must add meaning. It explains 'path' as the root path and 'language' with a list of possible values, adding significant context beyond the parameter names alone.

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 'Generate a tree directory structure as a string' and specifies filtering by programming language using regex patterns. It distinguishes from sibling tools, which are mostly Postman-related, making its purpose 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?

The description implicitly indicates when to use the tool (for generating a language-filtered directory tree), but does not explicitly state when not to use or mention alternatives. Given the sibling context, the use case is clear.

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/marioToribi0/code2postman-mcp'

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