Skip to main content
Glama
ttpears

GitLab MCP Server

by ttpears

Get Merge Request Context

get_merge_request_context
Read-onlyIdempotent

Bundle merge request body, notes, commits, pipeline summary, approvals, and linked issues into one call to avoid multiple API requests.

Instructions

Bundle MR body, all notes (paginated up to maxNotes, filtered to non-system by default), commits, pipeline summary, reviewers with approval state, and issues this MR will close into a single call. Use this instead of fanning out across get_merge_requests + get_notes + get_merge_request_commits + get_merge_request_pipelines when investigating an MR.

Input Schema

NameRequiredDescriptionDefault
iidYesMerge request IID
maxNotesNoCap on notes fetched. Default 100.
maxCommitsNoCap on commits fetched. Default 50.
projectPathYesFull project path (e.g. "my-group/my-project")
userCredentialsNoYour GitLab credentials (optional — falls back to the configured env token if not provided)
includeSystemNotesNoInclude system-generated notes. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.0.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / userCredentials / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "accessToken": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "gitlabUrl": {
      -        "format": "uri",
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "accessToken": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "gitlabUrl": {
      +        "format": "uri",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Addedv1.15.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so safety is covered structurally. The description adds useful behavioral context the annotations do not: notes are paginated up to maxNotes and system notes are excluded by default, which tells the agent the result may be a filtered/truncated view. It stops short of saying what happens when the cap is hit (truncation signal, ordering), so it is strong but not complete.

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?

Two sentences, zero filler. The inventory of bundled data comes first and the disambiguation rule second, which is the right order for an agent deciding whether to call it.

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?

There is no output schema, so the description carries the burden of describing the return shape, and it does so by enumerating the bundled sections. That is sufficient for an agent to know what comes back, though it does not describe nesting or per-section shapes, leaving a small gap for a multi-section aggregate tool.

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. The description still adds value by calling out the pagination cap (maxNotes) and the default non-system-notes filtering, reinforcing the two behavioral parameters beyond their inline schema text. It does not explain maxCommits or the credential fallback, but the schema covers those.

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 opens with a specific verb ("Bundle") and enumerates exactly what is bundled: MR body, notes, commits, pipeline summary, reviewers with approval state, and closing issues. It names the sibling tools it replaces, so an agent can distinguish it from get_merge_requests, get_notes, or get_merge_request_commits without opening a schema.

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?

It gives an explicit routing rule: "Use this instead of fanning out across get_merge_requests + get_notes + get_merge_request_commits + get_merge_request_pipelines when investigating an MR." That names both the alternative tools and the condition (investigating an MR) that selects this one.

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