Skip to main content
Glama

create_merge_request

Open a new merge request from a source branch to a target branch. Configure title, description, labels, assignees, reviewers, draft, and squash options to initiate code review.

Instructions

Create a new merge request. Use this to open a new merge request from an existing source branch to a target branch; use update_merge_request after it exists. The operation creates remote review state, requires project access, and returns the new merge request or a validation, permission, branch, or duplicate-related error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draftNoCreate as draft merge request
titleYesMerge request title
labelsNoLabels for the MR
squashNoIf true, squash all commits into a single commit 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_idsNoThe ID of the users to assign the MR to
reviewer_idsNoThe ID of the users to assign as reviewers of the MR
source_branchYesBranch containing changes
target_branchYesBranch to merge into
target_project_idNoNumeric ID of the target project.
allow_collaborationNoAllow commits from upstream members
remove_source_branchNoFlag indicating if a merge request should remove the source branch when merging.

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.62
    • changedInput schema / required
      Previous value: -[
      -  "title",
      -  "source_branch",
      -  "target_branch",
      -  "project_id"
      -]New value: +[
      +  "project_id",
      +  "title",
      +  "source_branch",
      +  "target_branch"
      +]
  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
    • changedInput schema / required
      Previous value: -[
      -  "title",
      -  "source_branch",
      -  "target_branch"
      -]New value: +[
      +  "title",
      +  "source_branch",
      +  "target_branch",
      +  "project_id"
      +]
  8. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only include openWorldHint, so the description carries the behavioral burden. It discloses that the operation 'creates remote review state' (side effect), 'requires project access' (permission prerequisite), and describes return behavior including error categories. These are meaningful, non-obvious behavioral traits not in the annotations.

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 sentences with no fluff. The purpose is front-loaded, followed by usage guidance, then behavioral context. Every sentence earns its place.

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

Completeness5/5

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

For a 14-parameter creation tool with no output schema, the description adequately covers purpose, lifecycle sequencing, side effects, permission requirements, and error outcomes. It provides enough for an agent to invoke the tool and interpret the response correctly without needing the schema for high-level semantics.

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 the baseline is 3. The description only reuses terms like 'source branch' and 'target branch' that are already explained in the schema; it adds no additional parameter-level meaning, but does not need to given full schema coverage.

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?

States the specific action ('Create a new merge request'), the resource ('merge request'), and the context (from existing source branch to target branch). Explicitly differentiates from the sibling `update_merge_request` by stating the lifecycle order, so an agent can clearly distinguish when to create vs. update.

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?

Provides explicit guidance: 'Use this to open a new merge request from an existing source branch to a target branch; use `update_merge_request` after it exists.' This gives a clear when-to-use condition and names the alternative, making tool selection unambiguous.

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