Skip to main content
Glama
igordev96
by igordev96

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GITLAB_HOSTYesBase URL of the GitLab instance, e.g. https://gitlab.example.com (no trailing slash).
GITLAB_TOKENYesRead-only GitLab token with the read_repository scope.
GITLAB_CA_INFONoPath to a CA bundle, if the server uses a private CA.
GITLAB_GIT_BINNoGit executable. Defaults to git.
GITLAB_MCP_CACHENoCache root for mirrors. Defaults to %LOCALAPPDATA%\gitlab-readonly-mcp or ~/.cache/... elsewhere.
GITLAB_FETCH_MODENoDefault freshness policy: ttl (default), always, or manual.ttl
GITLAB_DEFAULT_PROJECTNoProject path used when a tool call omits project, e.g. group/subgroup/repo.
GITLAB_FETCH_TTL_SECONDSNoAge in seconds after which a mirror counts as stale. Default 600; 0 behaves like always.600

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_fileA

Return the contents of a file at a given branch, tag, or commit WITHOUT checking it out. Use this to inspect files on a branch other than the one currently checked out. Give either url — a GitLab web link, whose #L12-20 line anchor is honoured — or both ref and path. The repository is mirrored locally on first use and refreshed when it goes stale, or, for a project registered with add_repo, read from your own clone. The result reports the resolved commit and the last sync time. If the copy cannot be refreshed, the cached copy answers and the result says the refresh failed.

list_treeA

List the files and subdirectories at a given ref, one level deep by default; set recursive to walk the whole subtree. Files carry their size in bytes, so you can tell a small config from a bundle before reading it. Names are full paths relative to the repository root. Give either url — a GitLab tree link — or ref (and optionally path). Everything comes from git, so no file is fetched to answer this. If the copy cannot be refreshed, the cached copy answers and the result says the refresh failed.

logA

List commits on a branch, tag, or commit — git log — newest first, without cloning it into a working tree. Each row is commit, date, author, subject, and a merge commit carries (merge). The ref defaults to the repository's default branch, is resolved before the walk, and the result states the commit it walked and synced_at. path is a git pathspec, so globs work — and history stops at a rename, because git's --follow accepts only one path and walks renames backwards; pass the new name or use get_commit when you need to see the rename itself. limit bounds the answer; when it hides older commits the result says so rather than inventing a total. Use get_commit on a row's full sha to see what it changed. Give either url — a GitLab /-/commits/<ref>[/<path>] link, e.g. 'https://gitlab.example.com/group/repo/-/commits/fix/PROJ-7608/src/index.tsx' — or ref and path; the link's host must be GITLAB_HOST.

get_commitA

Read one commit — its sha, parents, author and committer with dates, and full message — then the files it changed with git's status letter (A, M, D, R091 old -> new) and their line counts, or binary. rev accepts a full or abbreviated sha, or a branch or tag. patch: true appends the unified diff, capped by max_bytes. A merge commit reports merge="true" and no file list, because git shows no diff for a merge by default: compare a parent with the commit to see what it brought in. The result states the commit it resolved rev to and synced_at. Give either url — a GitLab /-/commit/<sha> link — or rev; the link's host must be GITLAB_HOST.

blameA

Show who last touched each line of a file at a branch, tag, or commit — git blame --porcelain — without a working tree. Lines are grouped into runs from the same commit: a row is commit, author, date, line range, then the lines themselves, numbered. lines narrows the blame to a range ("118-126", or "118"), and a range past the end is clamped and reported rather than treated as an error. max_lines caps how many lines come back. The ref defaults to the repository's default branch, and the result states the commit it blamed and synced_at. A binary file is refused: git blames one, but its lines carry NUL bytes. Give either url — a GitLab /-/blame/<ref>/<path> link, whose #L12-20 anchor narrows the blame — or ref and path; the link's host must be GITLAB_HOST.

compareA

Summarise what changed on to since it split from from — git diff <merge-base> <to> — as one row per file: git's status letter (A, M, D, R091 old -> new) and ± counts, or binary. The merge_base is printed, so which diff ran is never hidden; merge_base: false asks for the raw two-dot diff instead, and when the two refs share no history the two-dot diff runs with merge_base="none". This never returns a patch — a branch diff is unbounded — so the file list is capped by max_files and a capped answer says so. Use diff_file for one file's patch, passing a printed merge_base as from for the branch view of it. path is a git pathspec, and it narrows rename detection with it: a rename can then appear as a delete and an add. Both refs are resolved before the diff and both commits are stated in the result, with synced_at.

diff_fileA

The unified diff of one file between two refs — git diff -M <from> <to> -- <path> — without a working tree. The caller names the file and the diff is scoped before git runs, so nothing is found by parsing a patch header. context sets the lines shown around each hunk (default 3, 0-10) and max_bytes caps the diff. Scoping by path narrows rename detection, so a renamed file is read as an added (or deleted) file. The two refs are a raw two-dot diff: pass a merge_base printed by compare as from for the branch view of one file. A file that is unchanged between the refs yields no diff, and one absent from both is reported as not found. A binary file is refused: git has only a "Binary files … differ" line for it, which is not a patch.

list_refsA

List branch and/or tag names in a repository, without cloning it into a working tree. Each row is kind, short commit, name, and the tip commit's subject. The list reflects the local copy as of synced_at (by default at most 10 minutes old); a ref created since that moment may be missing, because a stale list cannot be detected. Use resolve_ref to check one specific ref, which does refresh on a miss. If the copy cannot be refreshed, the cached copy answers and the result says the refresh failed.

resolve_refA

Resolve a branch, tag, or revision to the full commit SHA it points at, and say what it is (branch, tag, or commit for anything else). Use this to confirm a ref exists before reading files from it. If the ref is missing, the error lists similar names, and it says so when the copy could not be refreshed, since then a missing ref proves nothing.

list_reposA

List the repositories this server knows about, with the freshness policy applied to each and when it last synced successfully. Each row is the project path followed by source (mirror or local), freshness (ttl, always or manual), ttl, clone_strategy=<value>(unsupported) when the registration names a strategy this server does not implement (only full is; such a project refuses to be read until it is re-cloned), present (whether the data is on disk), local_path for a local clone, and synced_at, or unknown when it has never synced. A mirror-backed project is registered the first time it is used; add_repo registers one before that, and is also how a project is pointed at an existing local clone. freshness=manual means nothing refreshes it by itself: use sync_repo.

add_repoA

Register a project with this server. With local_path, reads use that existing clone instead of a server-side mirror; the path is checked to be a git repository here, so a wrong path is refused now rather than at read time. Without it, the project is registered as mirror-backed, which also makes it appear in list_repos before it has ever been read. Nothing is cloned or fetched: use sync_repo for that, or simply read the project. A project already registered is updated; its freshness policy is kept.

remove_repoA

Forget a project's registration. With delete_mirror, the server-side mirror is deleted as well — but only a mirror: a registered local clone is never touched, and the request is reported as ignored. Forgetting a mirror-backed project is not permanent, since the next read registers it again and clones it again if the mirror was deleted. Forgetting a local registration is how a project goes back to being read from a mirror.

sync_repoA

Fetch a project immediately, ignoring its freshness policy — the way to refresh a project whose policy is manual, and to check for new refs without waiting for the TTL. A mirror-backed project is cloned if its mirror is missing; a project registered as a local clone is fetched from that clone's own remote. Unlike a read, a failure is reported as an error rather than answered from the cached copy, because this call exists to fetch.

searchA

Search a whole file tree at a branch, tag, or commit — git grep — without cloning it into a working tree. Matches come back grouped by file: the path, then line: text for each hit. Set output to files or count when you want to know which files, or how many hits each holds, rather than read the lines: those two ask git not to emit a matched line at all, so they stay cheap and their totals stay exact on a broad query. Matching is literal (foo|bar matches that text, not foo or bar) and case-insensitive unless you say otherwise; the ref defaults to the repository's default branch. The ref is resolved before searching, so a branch created moments ago is fetched on the miss, and the result states the commit it searched and synced_at. path is a git pathspec, passed through as git defines it: src/components/*.tsx works, but a plain pathspec's ** needs at least one directory level — use :(glob)src/**/*.tsx for zero or more. A path that matches nothing simply returns no matches. Pass context to see the lines around each match: the hunk is numbered and matched lines are marked >, which git's own context flags cannot do here — under -z they lose which line matched. Use pickaxe to find when the text appeared.

pickaxeA

Find the commits whose diff changed how often a piece of text appears — git log -S — so you can answer "when was this introduced, and by whom?". Each row is commit, date, author, subject, most recent first. The text is matched literally and case-insensitively, as search matches it, so a pickaxe never reports "nothing changed" about text the caller can see. Unlike search this walks the history of the ref and is therefore slower; pair it with search to go from "where is it" to "when did it appear". The ref defaults to the repository's default branch, and path is a git pathspec.

parse_gitlab_urlA

Turn a GitLab web link into the project, ref, path and line range a read needs — including a ref that contains slashes, which is resolved against the project's own refs. Accepts /-/blob/, /-/raw/, /-/tree/ and /-/blame/ links, which name a file or a directory, and /-/commit/ and /-/commits/[/], which name a commit and a history; merge request and other links are refused by name rather than guessed at. The link's host must be GITLAB_HOST. Resolving may mirror the project on first use; set resolve: false to parse offline without touching it. get_file, list_tree, log, get_commit and blame accept a url directly, so this tool is for inspecting a link, not for reading.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.3/5.0

Scored across 16 tools

Disambiguation5/5

Each tool maps to a distinct git or repository-management operation; overlaps like log/get_commit/pickaxe and compare/diff_file are explicitly separated in descriptions. No two tools appear interchangeable.

Naming Consistency4/5

Mostly snake_case with a verb_noun pattern, but several tools are bare git terms (log, blame, compare, search, pickaxe) rather than verb_noun. Casing is consistent and names remain readable, so this is a minor deviation.

Tool Count4/5

16 tools is at the upper end of the ideal 3-15 range, but each adds a distinct capability for git inspection plus mirror administration. Slightly heavy, though still reasonable for the domain.

Completeness4/5

Covers file/tree reading, ref resolution, commit history/detail, blame, diff/compare, search, pickaxe, URL parsing, and mirror registration/sync. Minor gaps: no project discovery on GitLab and no MR/issue support, but the core read-only git surface is complete.

Maintenance

ActivityMaintained
ResponsivenessNo issues