Skip to main content
Glama

get_repository_tree

Retrieve the file and directory structure of a GitLab project to explore repository contents, navigate codebases, and understand project organization.

Instructions

Get the repository tree for a GitLab project (list files and directories)

Input Schema

NameRequiredDescriptionDefault
project_idYesThe ID or URL-encoded path of the project
pathNoThe path inside the repository
refNoThe name of a repository branch or tag. Defaults to the default branch.
recursiveNoBoolean value to get a recursive tree
per_pageNoNumber of results to show per page
page_tokenNoThe tree record ID for pagination
paginationNoPagination method (keyset)

Input Schema (JSON Schema)

{ "properties": { "page_token": { "description": "The tree record ID for pagination", "type": "string" }, "pagination": { "description": "Pagination method (keyset)", "type": "string" }, "path": { "description": "The path inside the repository", "type": "string" }, "per_page": { "description": "Number of results to show per page", "type": "number" }, "project_id": { "description": "The ID or URL-encoded path of the project", "type": "string" }, "recursive": { "description": "Boolean value to get a recursive tree", "type": "boolean" }, "ref": { "description": "The name of a repository branch or tag. Defaults to the default branch.", "type": "string" } }, "required": [ "project_id" ], "type": "object" }

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

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