Skip to main content
Glama

get_repository_tree

Return a bounded map of directories and files for one repository, enabling you to understand its structure before choosing files. Specify max depth and entries to control scope.

Instructions

Return a bounded directory and file map for one repository. Use this to understand repository structure before selecting files. Do not use it to retrieve file contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_depthNo
workspaceYes
max_entriesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
entriesYes
truncatedYes
workspaceYes
Behavior3/5

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

With no annotations, the description carries the full burden. It conveys the output is a bounded directory/file map and clarifies it does not retrieve contents. However, it does not disclose error behavior, whether it follows nested submodules, or any specific limitations beyond 'bounded', leaving some gaps.

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 sentences, front-loaded with the main purpose in the first and usage guidance in the second. Every word earns its place; no redundancy or fluff.

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?

The purpose and primary usage are clear, and the output schema exists to document return values. However, the lack of parameter explanations and minimal behavioral disclosure make it adequate but incomplete for a tool with no annotations.

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%, yet the description does not explain workspace, max_depth, or max_entries. The only hints are 'one repository' and 'bounded', which are indirect and insufficient. The description fails to compensate for the bare schema.

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?

Describes a specific verb and resource: 'Return a bounded directory and file map for one repository.' It clearly differentiates from siblings by focusing on structure rather than contents, with the explicit exclusion 'Do not use it to retrieve file contents'.

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?

Provides clear context: 'Use this to understand repository structure before selecting files.' It also gives an explicit when-not: 'Do not use it to retrieve file contents.' However, it does not name an alternative tool like read_file, so it stops short of a perfect 5.

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/negativexq/repo-context-forge'

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