Skip to main content
Glama
mungowang
by mungowang

gitlab_mr_get

Read-only

Fetch a single merge request by project and IID to check its state, draft status, and mergeability before reviewing or merging.

Instructions

Get one merge request. Read state before anything else: only an opened merge request can be merged, and a merged one still reports merge_status can_be_merged. work_in_progress says whether it is a draft.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iidYesproject-scoped internal id - the number in !123 for a merge request or #123 for an issue, not the global id
projectYesproject id ('42') or full path ('group/subgroup/app'); a path is URL-encoded for you

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
iidNointernal id - the number in !123
shaNoHEAD of the source branch
stateNoopened / closed / locked / merged
titleNo
authorNouser reference
labelsNo
web_urlNo
assigneeNouser reference
milestoneNo
project_idNo
descriptionNo
merge_statusNo'can_be_merged' / 'cannot_be_merged' / 'unchecked'. A merged merge request on 11.3 still reports can_be_merged, so read state first - merge_status alone is not a green light
changes_countNoa string on 11.3, not a number
has_conflictsNonot sent by 11.3; compare merge_status instead
source_branchNo
target_branchNo
merge_commit_shaNo
user_notes_countNo
work_in_progressNo11.3 marks a draft MR this way; the title carries a "WIP: " prefix. Verified present on every one of 100 merge requests on the live instance

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds real behavioral value beyond that: it warns that a merged MR still reports merge_status can_be_merged and clarifies that work_in_progress signals draft status, which are non-obvious field semantics an agent would otherwise misread.

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?

Three tight sentences, front-loaded with the purpose before the state-reading caveats. No filler, though the second and third sentences pack several distinct caveats together with limited separation.

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?

An output schema exists, so return-value detail is unnecessary. The description covers the key gotchas of the returned state fields and is sufficient for an agent to call and interpret the tool. It does not touch on pagination or error cases, but those are minor for a single-resource get.

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

Parameters3/5

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

Schema description coverage is 100%, with both project and iid fully documented in the schema (including the !123 vs global-id distinction). The description adds nothing about parameters, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get one merge request'), making scope clear. It implicitly distinguishes itself from gitlab_mr_list via 'one' but never names the sibling it pairs with or contrasts against, so the differentiation is inferred rather than explicit.

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

Usage Guidelines3/5

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

The 'Read state before anything else' guidance gives a reason to call this tool and implies the merge workflow context. However, it never names alternatives (gitlab_mr_list, gitlab_mr_merge, gitlab_mr_changes) or states when-not to use this tool, leaving selection to inference.

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