Skip to main content
Glama

Accept merge request

gitlab_accept_merge_request
DestructiveIdempotent

Accept or merge a GitLab merge request using project ID and merge request IID, with optional auto-merge after the pipeline succeeds.

Instructions

Accept (merge) a merge request.

Pass merge_when_pipeline_succeeds=True to set auto-merge (merge once the pipeline succeeds) rather than merging immediately. Optional body params: merge_commit_message, squash_commit_message, squash, should_remove_source_branch, sha.

Args: **kwargs: project_id and merge_request_iid (required) plus optional merge parameters listed above.

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

Raises: MissingParameterError: If the project_id or merge_request_iid 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_accept_merge_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNo
nameNo
group_idNo
user_idsNo
group_idsNo
rule_typeNo
project_idNo
report_typeNo
approval_refNoOwner approval receipt for this operation; required by every owner-approved tool.
approval_rule_idNo
merge_request_iidNo
approvals_requiredNo
protected_branch_idsNo
applies_to_all_protected_branchesNo

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. First observedv27.3.13

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, so the safety profile is partly covered. The description adds useful detail on the auto-merge mode and on the two error types raised, but never states that the merge is irreversible, what permissions or approvals are needed, or what happens to the source branch by default.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The docstring layout with Args and Raises sections is easy to scan, but the optional-parameter list is a run-on enumeration and includes fields that do not exist in the schema, so the structure organizes misleading content efficiently rather than useful content.

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?

This is a high-complexity, 14-parameter destructive mutation with no output schema and near-zero schema documentation, so the description should explain the approval_ref requirement, permission needs, and the actual parameter set. It mentions the return wrapper, which is helpful, but the parameter mismatch and missing approval/permission context leave an agent unable to call this safely.

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 7% across 14 parameters, so the description must carry the load — and it names merge_commit_message, squash_commit_message, squash, should_remove_source_branch, and sha, none of which appear in the actual input schema. Meanwhile the schema's approval_ref (described as an owner approval receipt required by every owner-approved tool) and the many approval-rule parameters go unexplained, leaving the parameter contract actively confusing.

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 first line gives a specific verb and resource ('Accept (merge) a merge request'), which is unambiguous on its own. It does not, however, distinguish itself from siblings like gitlab_set_merge_request_auto_merge or gitlab_cancel_merge_when_pipeline_succeeds, even though it exposes the auto-merge behavior those tools are named for.

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

Usage Guidelines3/5

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

The description explains one meaningful branch point: pass merge_when_pipeline_succeeds=True for auto-merge instead of merging now. Beyond that there is no when-not-to-use guidance, no mention of the dedicated auto-merge sibling, and no prerequisites such as approval or permission requirements.

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