Skip to main content
Glama

gitlab_cancel_pipeline

DestructiveIdempotent

Cancel a running GitLab pipeline to stop stuck or unwanted work and interrupt in-flight jobs. Use it only on active pipelines; finished pipelines are unaffected.

Instructions

Cancel a running pipeline. In-flight jobs will be interrupted.

Destructive for in-progress work. Cancelling an already-finished pipeline is a no-op.

Examples: - "Pipeline 123 is stuck, cancel it" → pipeline_id=123 - Don't use on finished pipelines — no effect; use gitlab_retry_pipeline if you want to rerun it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pipeline_id": "<pipeline_id>",
      "project_path": "<project_path>"
    },
    "name": "gitlab_cancel_pipeline"
  }
}

Input Schema

NameRequiredDescriptionDefault
pipeline_idYesPipeline ID to cancel.
project_pathYesGitLab project path (e.g. 'my-org/my-repo'). Required by default. For legacy deployments only, set GITLAB_ALLOW_DEFAULT_PROJECT=true to use GITLAB_PROJECT_PATH when omitted.

Output Schema

NameRequiredDescriptionDefault
refNo
statusNo
web_urlNo
created_atNo
pipeline_idNo
status_noteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.5.5
    • removedInput schema / properties / project_path / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / project_path / default
      Removed value: -null
    • changedInput schema / properties / project_path / description
      Previous value: -"GitLab project path (e.g. 'my-org/my-repo'). When omitted, the default from GITLAB_PROJECT_PATH env var is used."New value: +"GitLab project path (e.g. 'my-org/my-repo'). Required by default. For legacy deployments only, set GITLAB_ALLOW_DEFAULT_PROJECT=true to use GITLAB_PROJECT_PATH when omitted."
    • addedInput schema / properties / project_path / minLength
      Added value: +1
    • addedInput schema / properties / project_path / type
      Added value: +"string"
    • changedInput schema / required
      Previous value: -[
      -  "pipeline_id"
      -]New value: +[
      +  "pipeline_id",
      +  "project_path"
      +]
  2. First observedv0.5.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description's added value is specifying *what* is destroyed (in-flight jobs) and the no-op behavior on completed pipelines — concrete consequences rather than a restatement. It stops short of mentioning required permissions or whether the cancellation is graceful vs. forced, but the safety picture is clear.

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 destructive consequence is front-loaded in the first two sentences and the example block earns its space by showing the routing decision. The RST-style double backticks are slightly noisy but do not impede comprehension.

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?

With an output schema present the description needn't explain return values, and it covers effect, edge case, and alternative. The only omission is whether cancelling requires special project permissions or ownership, a small gap for a destructive tool.

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% and both parameters are documented in the schema, so the baseline of 3 applies. The description only adds an illustrative 'pipeline_id=123' example and no format detail for project_path beyond what the schema already spells out.

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?

The opening sentence names a specific verb and resource ('Cancel a running pipeline') and immediately scopes the effect ('In-flight jobs will be interrupted'). It also distinguishes itself from sibling gitlab_retry_pipeline, so an agent can choose between them without reading schemas.

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?

Includes an explicit when-to-use example ('Pipeline 123 is stuck, cancel it') and an explicit when-not-to-use plus alternative ('Don't use on finished pipelines ... use gitlab_retry_pipeline if you want to rerun it'). Both the selection condition and the fallback tool are named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.