Skip to main content
Glama

create_merge_request

Open a merge request from an existing source branch to a target branch in GitLab, setting title, description, labels, reviewers, assignees, and draft status.

Instructions

Create a new merge request. Open a merge request from an existing source branch to a target. Use update_merge_request after it exists.

Input Schema

NameRequiredDescriptionDefault
draftNoCreate as draft
titleYesMerge request title
labelsNoMR labels
squashNoSquash commits on merge
jmespathNoOptional JMESPath expression filtering the JSON result before return.
project_idYesProject ID or complete URL-encoded path to project
descriptionNoMerge request description
assignee_idsNoAssignee user IDs
reviewer_idsNoReviewer user IDs
source_branchYesSource branch
target_branchYesTarget branch
target_project_idNoTarget project numeric ID
allow_collaborationNoAllow eligible upstream members to push to the fork source branch
remove_source_branchNoRemove source branch on merge

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.3.22
    • changedInput schema / properties / allow_collaboration / description
      Previous value: -"Allow commits from upstream members"New value: +"Allow eligible upstream members to push to the fork source branch"
    • 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 / draft / description
      Previous value: -"Create as draft merge request"New value: +"Create as draft"
    • changedInput schema / properties / labels / description
      Previous value: -"Labels for the MR"New value: +"MR labels"
    • changedInput schema / properties / remove_source_branch / description
      Previous value: -"Flag indicating if a merge request should remove the source branch when merging."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 / source_branch / description
      Previous value: -"Branch containing changes"New value: +"Source branch"
    • changedInput schema / properties / squash / description
      Previous value: -"If true, squash all commits into a single commit on merge."New value: +"Squash commits on merge"
    • changedInput schema / properties / target_branch / description
      Previous value: -"Branch to merge into"New value: +"Target branch"
    • changedInput schema / properties / target_project_id / description
      Previous value: -"Numeric ID of the target project."New value: +"Target project numeric ID"
  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.62
    • changedInput schema / required
      Previous value: -[
      -  "title",
      -  "source_branch",
      -  "target_branch",
      -  "project_id"
      -]New value: +[
      +  "project_id",
      +  "title",
      +  "source_branch",
      +  "target_branch"
      +]
  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
    • changedInput schema / required
      Previous value: -[
      -  "title",
      -  "source_branch",
      -  "target_branch"
      -]New value: +[
      +  "title",
      +  "source_branch",
      +  "target_branch",
      +  "project_id"
      +]
  9. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

The only annotation is openWorldHint=true, so the description carries most of the behavioral burden. It usefully discloses the prerequisite that the source branch must already exist, but says nothing about write-access requirements, draft/squash side effects, cross-project forking, or error behavior when branches are identical or missing.

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, front-loaded with the action and followed by scope and the lifecycle handoff. No filler and nothing redundant with the schema.

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 14-parameter write tool with no output schema, the description covers purpose and lifecycle routing but leaves the agent without any statement about return content, permissions, or the meaning of the riskier options (draft, squash, cross-project). Adequate but thin relative to the tool's complexity.

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%, so all 14 parameters including target_project_id, jmespath, and allow_collaboration are already self-documented. The description adds only the source-to-target branch relationship, which the schema fields already convey, so the baseline of 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 ("Create a new merge request") and adds the key topology detail that it runs from an existing source branch to a target. This distinguishes it from read siblings like get_merge_request and list_merge_requests, though it never names which sibling creates the source branch it depends on.

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?

Explicitly routes the agent to `update_merge_request` for post-creation changes, which is a clear when-to-use-which rule. It does not state any when-not conditions, such as preferring an existing MR path or what to do if an MR already exists for the branch pair.

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