Skip to main content
Glama

Set merge request auto merge

gitlab_set_merge_request_auto_merge
DestructiveIdempotent

Arms auto-merge for a merge request so it lands when the pipeline succeeds, tied to an expected head commit; a stale SHA is rejected and nothing is armed.

Instructions

Set auto-merge (merge when the pipeline succeeds) for an expected head commit.

The tool declares owner_approval_required: the SDK refuses a call without approval_ref with code approval_required before this method runs. A stale sha (GitLab 409) refuses with head_mismatch and arms nothing.

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_set_merge_request_auto_merge"
  }
}

Input Schema

NameRequiredDescriptionDefault
shaNo
project_idNo
approval_refNoOwner approval receipt for this operation; required by every owner-approved tool.
merge_request_iidNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv27.3.26

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important preconditions and failure semantics: approval_ref is required and missing it produces approval_required before the method runs. It also explains that a stale sha is refused with head_mismatch and leaves auto-merge unarmed.

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?

The description is front-loaded with the main action and then gives two tightly scoped behavioral details. Every sentence contributes useful information without padding.

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

Completeness4/5

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

For a mutation tool with no output schema, the description covers the key preconditions and failure modes an agent needs before calling it. It does not spell out the success response or cancellation alternative, but those are secondary given the existing annotations and sibling tooling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 25%, so the description must carry extra meaning. It adds critical semantics for sha as an expected head commit and approval_ref as an owner approval receipt, though project_id and merge_request_iid are left to their self-explanatory names.

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 states a specific verb and resource: setting auto-merge so the merge occurs when the pipeline succeeds, scoped to an expected head commit. It is clear what the tool does, but it does not explicitly distinguish this action from the close sibling that cancels merge-when-pipeline-succeeds.

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?

Usage is implied by the phrase 'merge when the pipeline succeeds' and by the expected-head-commit constraint. However, it does not explicitly say when to choose this over immediate merge, accepting/merging a request, or canceling auto-merge.

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