Skip to main content
Glama

Cancel merge when pipeline succeeds

gitlab_cancel_merge_when_pipeline_succeeds

Cancels a merge request's queued auto-merge set to run when the pipeline succeeds, using the project ID and merge request IID.

Instructions

Cancel a merge request's queued "merge when pipeline succeeds" (auto-merge).

Args: **kwargs: project_id and merge_request_iid (required).

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.

Input Schema

NameRequiredDescriptionDefault
dataNo
nameNo
group_idNo
user_idsNo
group_idsNo
rule_typeNo
project_idNo
report_typeNo
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. First observedv27.3.13

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=true, so the safety profile is covered. The description adds value beyond that by clarifying that only the queued auto-merge is cancelled (not the MR itself) and by documenting the return wrapper with a MergeRequest model plus two specific error types. It still does not state required permissions or what happens if no auto-merge is queued.

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 purpose sentence is front-loaded and efficient, and the Args/Returns/Raises blocks are scannable. Some docstring boilerplate ('**kwargs', 'A wrapper containing the original response') adds little, but nothing is redundant.

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?

Return shape and error conditions are documented despite no output schema, and the scope of the cancellation is clarified. For a simple state-toggling action this is close to sufficient; the gaps are permissions/authorization needs and any note on schema-vs-description disagreement about required parameters.

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 coverage is 0% across 13 parameters, so the description carries the burden; it does identify the only two meaningful inputs (project_id, merge_request_iid) and marks them required, which the schema's empty required list does not. However, it leaves the other 11 schema properties (group_id, approval_rule_id, rule_type, etc.) completely unexplained, so an agent cannot tell whether they are spurious or usable.

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 a precise verb ('Cancel') and a specific resource ('merge request's queued "merge when pipeline succeeds" (auto-merge)'), with the parenthetical disambiguating the GitLab-specific feature. An agent can distinguish this from gitlab_unapprove_merge_request, gitlab_accept_merge_request, or pipeline-cancel siblings without opening a schema.

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 implies usage (you have an MR with auto-merge queued and want to withdraw it) but never states when to prefer this over related siblings such as gitlab_unapprove_merge_request or gitlab_graphql_ops_delete_merge_request. No prerequisites or preconditions are given, so the agent must infer the scenario.

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