Skip to main content
Glama

Create merge request

gitlab_create_merge_request
Destructive

Create a new merge request by specifying the project, source branch, target branch, and title. Use it to open code changes for review and merge in GitLab.

Instructions

Create a new merge request.

Args: **kwargs: Additional parameters for the request (e.g., project_id, source_branch, target_branch, title).

Returns: Response: A wrapper containing the original response and a MergeRequest model.

Raises: MissingParameterError: If the project_id, source_branch, target_branch, or title is missing. ParameterError: If invalid parameters are provided.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gitlab_create_merge_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
wipNo
dataNo
pageNo
sortNo
viewNo
scopeNo
stateNo
titleNo
labelsNo
searchNo
squashNo
order_byNo
per_pageNo
author_idNo
max_pagesNo
milestoneNo
search_inNo
project_idNo
assignee_idNo
descriptionNo
environmentNo
reviewer_idNo
approval_refNoOwner approval receipt for this operation; required by every owner-approved tool.
approver_idsNo
assignee_idsNo
milestone_idNo
reviewer_idsNo
created_afterNo
source_branchNo
target_branchNo
updated_afterNo
created_beforeNo
deployed_afterNo
search_excludeNo
updated_beforeNo
approved_by_idsNo
author_usernameNo
deployed_beforeNo
my_reaction_emojiNo
reviewer_usernameNo
target_project_idNo
allow_collaborationNo
with_labels_detailsNo
remove_source_branchNo
approvals_before_mergeNo
allow_maintainer_to_pushNo
with_merge_status_recheckNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv27.3.26
    • addedInput schema / properties / approval_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Owner approval receipt for this operation; required by every owner-approved tool."
      +}
  2. Changed4 schema fields changedv27.3.20
    • removedInput schema / properties / api_parameters
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • changedInput schema / properties / max_pages / default
      Previous value: -0New value: +null
    • changedInput schema / properties / page / default
      Previous value: -1New value: +null
    • changedInput schema / properties / per_page / default
      Previous value: -100New value: +null
  3. Changed2 schema fields changedv27.3.18
    • addedInput schema / properties / title / default
      Added value: +null
    • removedInput schema / required
      Removed value: -[
      -  "title"
      -]
  4. First observedv27.3.13

TDQS

C2.9/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=true, openWorldHint=true, and idempotentHint=false, so the safety profile is externally visible. The description adds useful behavioral details by documenting the returned wrapper/MergeRequest model and the MissingParameterError/ParameterError conditions. However, it does not mention the approval_ref requirement or explain the implications of the destructive, non-idempotent operation.

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 compact and front-loads the core purpose before the Args/Returns/Raises sections. It is structured and easy to scan, with no redundant or filler sentences. The generic '**kwargs' framing is slightly at odds with the explicit input schema but does not harm conciseness.

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

Completeness2/5

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

For a destructive mutation with 47 parameters and no output schema, the description is incomplete. It covers the basic action, four key parameters, and error behavior, but omits approval_ref, most optional parameter semantics, and any explanation of destructive or idempotency implications. The annotations help with safety flags, but the description does not do enough to guide correct 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 description coverage is only 2% across 47 parameters, so the description must compensate heavily. It names only four parameters (project_id, source_branch, target_branch, title) and indicates they are required through the Raises section, which is useful. The remaining 43 parameters, including approval_ref and other mutation-affecting fields, receive no semantic explanation.

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?

The description gives a specific verb and resource: 'Create a new merge request.' This clearly distinguishes creation from sibling operations like approve, accept, close, or get. It does not explicitly name sibling alternatives, but the purpose is unambiguous.

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?

The description states what the tool does but gives no explicit when-to-use guidance. It does not explain when to create a merge request versus using a related sibling such as gitlab_create_branch or the GraphQL update operation. No exclusions or prerequisites are provided.

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