Skip to main content
Glama

gitlab_get_merge_request

Read-onlyIdempotent

Retrieve full details of a GitLab merge request by IID, including state, branches, author, assignees, reviewers, labels, conflicts, description, and timestamps.

Instructions

Get full information about a merge request by internal ID (iid).

Includes state, branches, author, assignees, reviewers, labels, conflict status, description and timestamps.

Examples: - "Show me the description and state of !42" → mr_iid=42 - Don't use to see changed files — use gitlab_get_merge_request_changes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mr_iid": "<mr_iid>",
      "project_path": "<project_path>"
    },
    "name": "gitlab_get_merge_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
mr_iidYesMerge request IID (project-local number shown as '!42').
project_pathYesGitLab project path (e.g. 'my-org/my-repo'). Required by default. For legacy deployments only, set GITLAB_ALLOW_DEFAULT_PROJECT=true to use GITLAB_PROJECT_PATH when omitted.

Output Schema

NameRequiredDescriptionDefault
iidYes
stateYes
titleYes
authorYes
labelsYes
web_urlYes
assigneesYes
merged_atYes
reviewersYes
created_atYes
updated_atYes
descriptionYes
merge_statusYes
changes_countYes
has_conflictsYes
source_branchYes
target_branchYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.5.5
    • removedInput schema / properties / project_path / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / project_path / default
      Removed value: -null
    • changedInput schema / properties / project_path / description
      Previous value: -"GitLab project path (e.g. 'my-org/my-repo'). When omitted, the default from GITLAB_PROJECT_PATH env var is used."New value: +"GitLab project path (e.g. 'my-org/my-repo'). Required by default. For legacy deployments only, set GITLAB_ALLOW_DEFAULT_PROJECT=true to use GITLAB_PROJECT_PATH when omitted."
    • addedInput schema / properties / project_path / minLength
      Added value: +1
    • addedInput schema / properties / project_path / type
      Added value: +"string"
    • changedInput schema / required
      Previous value: -[
      -  "mr_iid"
      -]New value: +[
      +  "mr_iid",
      +  "project_path"
      +]
  2. First observedv0.5.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false, openWorldHint), so the description only needs to add value, which it does by scoping the payload to MR metadata rather than diffs. It stops short of noting error behavior (e.g. what happens for a nonexistent iid or inaccessible project) or permission requirements, leaving a modest gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and the identifier, then a field list, then a task-mapped example and the exclusion rule. Mildly heavy in the enumerated field list (largely duplicated by the output schema) and carries docstring-style backtick noise, but no sentence is wasted.

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?

With an output schema present, return-format explanation is unnecessary, and the description covers identity, scope, and the nearest sibling alternative. It is nearly complete for a two-parameter read tool, lacking only guidance on failure modes (404/invalid project path) that an agent might want when planning retries.

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 baseline is 3; the description earns an extra point by stressing 'internal ID (iid)' and tying it to the '!42' notation, which guards against the IID-vs-global-ID confusion the schema alone only briefly mentions. It adds nothing further about project_path, but the schema already explains the legacy default-project behavior.

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 (get full information about a merge request), names the exact lookup key (iid), and enumerates the returned facets (state, branches, author, reviewers, labels, conflict status, timestamps). It explicitly distinguishes itself from the sibling gitlab_get_merge_request_changes, so an agent can choose without opening either 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?

Provides a concrete invocation example ("Show me the description and state of !42" → mr_iid=42) and an explicit negative routing rule: do not use for changed files, use gitlab_get_merge_request_changes. This is the when/when-not/alternative pattern in compact form.

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