Skip to main content
Glama

Get repository file tree

get_repo_tree
Read-only

Retrieve a repository's folder and file structure as an indented tree; use path and depth options to inspect a specific subfolder without listing the entire repository.

Instructions

The folder and file structure of a repository, as an indented tree. Use path to focus on a subfolder and max_depth to control detail.

Input Schema

NameRequiredDescriptionDefault
refNoBranch, tag or commit SHA (default: the default branch)
pathNoOnly show this subfolder, e.g. 'src/main/java'
repoYesRepository name, e.g. 'spring-boot'
ownerYesRepository owner (user or organization), e.g. 'spring-projects'
max_depthNoHow many folder levels to show below path (default 3)
max_entriesNoMaximum lines to return (default 300)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds genuinely useful behavioral context by disclosing the return format ('indented tree'), but says nothing about truncation behavior, size limits, or cost despite max_entries existing.

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, zero filler, with the core identity stated first and the disambiguating knobs second. Nothing could be removed without losing information.

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?

With no output schema, the description valuably indicates the return format, and all six parameters are documented in-schema. Only minor gaps remain around result truncation and large-repo behavior, which matter given max_entries defaults to 300.

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%, with examples for owner, repo, ref, and path, so the schema carries the semantic load. The description only restates path and max_depth usage without adding syntax or constraints beyond what the schema already provides; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource (folder and file structure of a repository) and states the output shape ('indented tree'). It does not distinguish itself from siblings such as get_file_contents, which also returns repository content, but the intent is unambiguous.

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

Usage Guidelines3/5

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

'Use path to focus on a subfolder and max_depth to control detail' is parameter usage advice, not tool-selection guidance. There is no statement of when to prefer this over get_file_contents or get_repository, leaving the agent to infer the browsing use case.

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