Skip to main content
Glama

update_merge_request

Modify an existing GitLab merge request by IID or source branch to update its title, description, labels, assignees, reviewers, draft status, or state.

Instructions

Update a merge request (merge_request_iid or source_branch required). Use the create tool for new resources and a note tool for comments.

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": {
      "project_id": "<project_id>"
    },
    "name": "update_merge_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
draftNoDraft / WIP
titleNoMR title
labelsNoMR labels
squashNoSquash commits on merge
jmespathNoOptional JMESPath expression filtering the JSON result before return.
project_idYesProject ID or URL-encoded path
descriptionNoMR description
state_eventNoclose or reopen
assignee_idsNoAssignee user IDs
milestone_idNoMilestone ID. 0 unassigns. Null is omitted.
reviewer_idsNoReviewer user IDs
source_branchNoSource branch name
target_branchNoTarget branch
merge_request_iidNoMerge request IID
remove_source_branchNoRemove source branch on merge

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv2.3.22
    • changedInput schema / properties / assignee_ids / description
      Previous value: -"The ID of the users to assign the MR to"New value: +"Assignee user IDs"
    • changedInput schema / properties / description / description
      Previous value: -"The description of the merge request"New value: +"MR description"
    • changedInput schema / properties / draft / description
      Previous value: -"Work in progress merge request"New value: +"Draft / WIP"
    • changedInput schema / properties / labels / description
      Previous value: -"Labels for the MR"New value: +"MR labels"
    • changedInput schema / properties / merge_request_iid / description
      Previous value: -"The IID of a merge request"New value: +"Merge request IID"
    • changedInput schema / properties / milestone_id / description
      Previous value: -"Milestone ID to assign. Set to 0 to unassign. Null is treated as omitted."New value: +"Milestone ID. 0 unassigns. Null is omitted."
    • changedInput schema / properties / project_id / description
      Previous value: -"Project ID or complete URL-encoded path to project"New value: +"Project ID or URL-encoded path"
    • changedInput schema / properties / remove_source_branch / description
      Previous value: -"Flag indicating if the source branch should be removed"New value: +"Remove source branch on merge"
    • changedInput schema / properties / reviewer_ids / description
      Previous value: -"The ID of the users to assign as reviewers of the MR"New value: +"Reviewer user IDs"
    • changedInput schema / properties / squash / description
      Previous value: -"Squash commits into a single commit when merging"New value: +"Squash commits on merge"
    • changedInput schema / properties / state_event / description
      Previous value: -"New state (close/reopen) for the MR"New value: +"close or reopen"
    • changedInput schema / properties / target_branch / description
      Previous value: -"The target branch"New value: +"Target branch"
    • changedInput schema / properties / title / description
      Previous value: -"The title of the merge request"New value: +"MR title"
  2. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  3. 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"
      +}
  4. Addedv2.1.18
  5. Removedv2.1.14
  6. Addedv2.1.11
  7. Removedv2.1.10
  8. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "project_id"
      +]
  9. First observedv1.0.0

TDQS

A3.5/5.0
Behavior2/5

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

The only annotation is openWorldHint=true, so the description carries the full behavioral burden for a mutation tool and largely drops it. It never states that this is a mutation, that changes are applied immediately without confirmation, or that state_event can close or reopen an MR, and it says nothing about which settings are left untouched when omitted.

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?

Two short sentences, front-loaded with the action and the routing advice immediately after. Every clause carries information; the only minor cost is that the parenthetical constraint is buried mid-sentence rather than stated as a standalone requirement.

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?

With 15 parameters, a mutation surface, and no output schema, the definition is thinner than the tool's complexity warrants. The fully documented schema compensates for parameter meaning, but the description omits confirmation semantics and the close/reopen side effect that an agent should warn about before calling.

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 would be 3, but the description adds a real constraint absent from the schema: that merge_request_iid or source_branch is required. The schema lists only project_id as required, so this note prevents a validation-level mistake. It adds nothing about the enum-constrained state_event or the merge-time flags.

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?

"Update a merge request" gives a specific verb plus resource, and the parenthetical identifier constraint narrows the target further. It stops short of distinguishing itself from other merge-request siblings by name (e.g. get_merge_request, create_merge_request), so an agent must infer the read/write split.

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

Usage Guidelines4/5

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

Explicit when-not guidance is present: creation of new resources goes to the create tool, and commenting goes to a note tool. That routes the two most likely mis-selections. It does not cover the read-side alternative (get_merge_request) or prerequisites such as permissions or MR state.

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