Skip to main content
Glama
gitlab-readonly-mcp
by igordev96

Register a repository

add_repo

Register a GitLab project for read-only access, using either an existing local clone or a server-side mirror; invalid paths are rejected and re-registration updates settings.

Instructions

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "add_repo"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectNoGitLab project path, e.g. 'group/subgroup/repo'. Defaults to GITLAB_DEFAULT_PROJECT.
local_pathNoPath to an existing clone (or bare repository) to read from instead of a mirror.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say this is a non-destructive, non-open-world write; the description adds the substantive behavior: the path is validated as a git repo at call time so bad paths fail early, nothing is cloned or fetched, mirror-backed projects become visible in `list_repos` immediately, and re-registration updates while preserving the freshness policy. These are consequences an agent cannot infer from the structured fields.

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?

Four tight sentences, each carrying a distinct fact (mode, validation, mirror consequence, no-fetch/alternative). Front-loaded with the core action before the branching detail.

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?

For a 2-optional-parameter registration tool with no output schema, the description covers modes, validation, idempotency, and the sibling to use for fetching. It stops short of hinting what a registration returns (e.g. an identifier the agent would need for later calls) or any auth/token expectations.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains the validation timing for `local_path` and the downstream consequence (mirror-backed registration and `list_repos` visibility) that the schema description does not mention.

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?

States a specific verb and resource ('Register a project with this server') and immediately splits the two registration modes: local_path-backed vs mirror-backed. An agent can distinguish it from siblings like `sync_repo` and `list_repos` purely from the text.

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

Usage Guidelines5/5

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

Explicitly covers the when-to-use branch for each parameter ('With `local_path`... Without it...') and names the alternative for the fetching case ('use `sync_repo` for that, or simply read the project'). It also states the re-registration path, so an agent knows calling it twice is safe.

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