Skip to main content
Glama

update_merge_request

Update an existing GitLab merge request by changing its title, description, labels, assignees, state, or other fields. Provide project ID and merge request IID or branch name to apply changes.

Instructions

Update a merge request (mergeRequestIid or branchName required). Use this for an existing resource; choose the corresponding create tool for a new resource and a note tool for discussion-only text. It changes remote GitLab state and requires the necessary project or group permission; GitLab returns validation, conflict, permission, or rate-limit errors instead of silently applying an invalid request. When project_id or group_id is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draftNoWork in progress merge request
titleNoThe title of the merge request
labelsNoLabels for the MR
squashNoSquash commits into a single commit when merging
jmespathNoOptional JMESPath expression filtering the JSON result before return.
project_idYesProject ID or complete URL-encoded path to project
descriptionNoThe description of the merge request
state_eventNoNew state (close/reopen) for the MR
assignee_idsNoThe ID of the users to assign the MR to
milestone_idNoMilestone ID to assign. Set to 0 to unassign. Null is treated as omitted.
reviewer_idsNoThe ID of the users to assign as reviewers of the MR
source_branchNoSource branch name
target_branchNoThe target branch
merge_request_iidNoThe IID of a merge request
remove_source_branchNoFlag indicating if the source branch should be removed

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv2.1.43
    • addedInput schema / properties / milestone_id
      Added value: +{
      +  "description": "Milestone ID to assign. Set to 0 to unassign. Null is treated as omitted.",
      +  "type": "string"
      +}
  3. Addedv2.1.18
  4. Removedv2.1.14
  5. Addedv2.1.11
  6. Removedv2.1.10
  7. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "project_id"
      +]
  8. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only include openWorldHint, so the description carries the burden. It discloses that the tool changes remote GitLab state, requires project or group permission, and returns validation/conflict/permission/rate-limit errors rather than silently succeeding. This is useful, though it does not mention destructive effects like remove_source_branch or what happens on merged MRs.

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?

The description is front-loaded with purpose and usage distinction, and stays compact. Minor boilerplate like 'use required identifiers and pagination fields exactly as documented' is vague and could be trimmed, but overall it is efficient and well-ordered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter mutation tool with no output schema, the description gives high-level context: mutates remote state, needs permissions, and surfaces error types. However, it omits critical specifics such as valid identifier combinations, the meaning of state_event/remove_source_branch, and does not resolve the misleading required-field statement. The schema carries much of the parameter detail, but the description is not fully complete for safe invocation.

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

Parameters2/5

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

Schema coverage is 100%, so baseline is 3, but the description misleadingly states 'mergeRequestIid or branchName required' while the schema's required list contains only project_id, and 'branchName' does not appear as a parameter. This contradiction undermines guidance. The useful note about project_id/group_id path encoding is outweighed by the incorrect required-field claim.

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 'Update a merge request', a specific verb and resource, and immediately distinguishes this tool from create and note tools. It clearly identifies this as the mutation tool for existing merge requests against siblings like create_merge_request and update_merge_request_note.

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?

The description explicitly tells the agent to use the corresponding create tool for new resources and a note tool for discussion-only text, providing clear when-not guidance. It also notes permission requirements and describes error behavior, so the agent knows when this tool is appropriate versus alternatives.

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

Deploy Server

Other Tools