Skip to main content
Glama

Update Merge Request

gitlab_update_merge_request

Update GitLab merge request fields like title, labels, reviewers, milestone, and state. Use labels to replace all, add_labels/remove_labels for targeted changes, and milestone_id 0 to unassign.

Instructions

Update merge request fields. labels replaces every label; add_labels and remove_labels change only the named ones. milestone_id 0 unassigns the milestone.

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": {
      "merge_request_iid": "<merge_request_iid>"
    },
    "name": "gitlab_update_merge_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
draftNo
titleNo
labelsNo
squashNo
reviewersNo
add_labelsNo
project_idNo
descriptionNo
state_eventNo
assignee_idsNo
milestone_idNo
reviewer_idsNo
remove_labelsNo
source_branchNo
target_branchNo
discussion_lockedNo
merge_request_iidYes
allow_collaborationNo
remove_source_branchNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changedv1.7.0
    • addedInput schema / properties / add_labels
      Added value: +{
      +  "anyOf": [
      +    {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      ]
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / allow_collaboration
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • removedInput schema / properties / description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / description / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / discussion_locked
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • removedInput schema / properties / draft / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / draft / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • addedInput schema / properties / milestone_id
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / remove_labels
      Added value: +{
      +  "anyOf": [
      +    {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      ]
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • removedInput schema / properties / remove_source_branch / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / remove_source_branch / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedInput schema / properties / squash / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / squash / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedInput schema / properties / state_event / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / state_event / enum
      Added value: +[
      +  "close",
      +  "reopen"
      +]
    • addedInput schema / properties / state_event / type
      Added value: +"string"
    • removedInput schema / properties / title / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / title / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. First observedv1.6.1

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the safety profile is covered. The description adds genuinely non-obvious mutation semantics that annotations cannot express: 'labels replaces every label' while add_labels/remove_labels are additive, and milestone_id 0 unassigns. This prevents silent label loss. It stops short of covering permissions, state_event side effects, or whether omitted fields are left untouched.

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?

Three short sentences, zero filler, with the most consequential rule (full label replacement) front-loaded. Every sentence carries distinct information.

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 19-parameter mutation tool with no output schema, the description covers only the label and milestone semantics; the duplicated reviewers/reviewer_ids pair, state_event, and branch-related fields remain unexplained. It is adequate for the riskiest operations but does not fully inform an agent about the breadth of the update surface or what the call returns.

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 0%, so the description has to carry the burden, and it does clarify the highest-risk ambiguity: the labels vs add_labels vs remove_labels triad and the milestone_id zero sentinel. However, 15 of 19 parameters (state_event, allow_collaboration, discussion_locked, reviewers vs reviewer_ids, source_branch/target_branch, squash, draft) receive no explanation at all.

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 ('Update merge request fields'), which cleanly separates it from the sibling write tools that act on notes, emoji reactions, or approval/merge state transitions. It never names which fields or the sibling it is not, so differentiation comes from the name rather than the prose.

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

Usage Guidelines2/5

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

There is no when-to-use guidance beyond the implied 'modify an existing MR', no mention of prerequisites or permissions, and no routing to alternatives such as gitlab_get_merge_request for inspection or the note/emoji-specific updaters. The agent must infer that this is the general-purpose mutation entry point.

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