Skip to content

Completions

Completions provide real-time autocomplete suggestions for tool parameters. Instead of memorizing project IDs, branch names, or user logins, you type a few characters and the server queries GitLab for matches.

Without completions:
User: "Create issue in project..." → What's the ID? → Must call list_projects first
With completions:
User types: "mcp" → Server suggests: "gitlab-mcp-server (1835)", "redmine-mcp-server (1869)"

This transforms a multi-step lookup into a single, interactive selection.

sequenceDiagram
    participant U as User
    participant AI as AI Assistant
    participant S as MCP Server
    participant GL as GitLab API

    U->>AI: Starts typing argument value
    AI->>S: completion/complete (arg: "project_id", value: "mcp")
    S->>GL: GET /projects?search=mcp
    GL-->>S: Matching projects
    S-->>AI: Completion suggestions
    AI->>U: Shows dropdown with options

The server supports 17 completion argument types organized into global and per-project completers:

These work without a project context:

ArgumentCompletesExample
projectProject names/pathsmy-group/my-project
groupGroup names/pathsengineering
userUser names/loginsjohn.doe
namespaceNamespaces (groups + users)my-group

These require a project context and search within that project:

ArgumentCompletesExample
branchBranch namesfeature/login
tagTag namesv1.2.0
milestoneMilestone titlesSprint 14
labelLabel namespriority::high
merge_requestMR titles/IIDs!42 Fix login
issueIssue titles/IIDs#100 Bug report
pipelinePipeline IDs12345
environmentEnvironment namesproduction
releaseRelease tag namesv2.0.0
wiki_slugWiki page slugsgetting-started
versionVersion/milestone IDsv1.0
runnerRunner descriptionsshared-runner-1
boardBoard namesDevelopment

Completions reduce errors in several ways:

  1. Eliminates typos — Users select from validated suggestions instead of typing exact values
  2. Reduces round-trips — No need to call list_projects before create_issue
  3. Provides context — Suggestions include IDs alongside names, ensuring correct values
  4. Real-time search — Results update as the user types, powered by GitLab’s search API