Skip to main content
Glama

List repository tree

list_repository_tree
Read-onlyIdempotent

List a GitLab repository's files and directories at a specific branch, tag, or commit. Provide project ID or path, and optionally set path, recursion, and pagination.

Instructions

List files and directories in a GitLab repository at a branch, tag, or commit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
pageNo
pathNo
projectYesGitLab project ID or full path such as group/project.
per_pageNo
recursiveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesGitLab response normalized for model use.
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, covering the safety profile. The description adds useful context by specifying that the ref can be a branch, tag, or commit, but does not disclose pagination, recursion, or path behavior. This is adequate given the strong annotation support.

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 a single, front-loaded sentence: 'List files and directories in a GitLab repository at a branch, tag, or commit.' Every word contributes meaning, with no wasted or redundant phrasing.

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 tool has 6 parameters and an output schema, but the description only covers the core listing behavior and ref selection. It does not mention path, recursive traversal, or pagination options, though the output schema may fill in return value details. For a list operation this is minimally viable, but more guidance on optional filters would improve completeness.

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

Parameters2/5

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

Schema coverage is only 17% (only 'project' has a description). The description adds meaning to 'ref' via 'at a branch, tag, or commit', but the other five parameters (path, recursive, page, per_page, and partially ref) remain underspecified. Given the low schema coverage, the description should compensate more than this.

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 uses a specific verb ('List') and a distinct resource ('files and directories in a GitLab repository') at a specific ref type. It clearly separates this tool from siblings like get_file or get_blob, which retrieve file contents rather than listing the repository tree.

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?

The description implies when to use the tool: when you need to list files/directories at a branch, tag, or commit. However, it does not explicitly mention alternatives or when not to use it, despite a large set of sibling tools like get_blob, get_file, or list_branches that could be confused with it.

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/CobolJunkie/gitlab-mcp'

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