Skip to main content
Glama

Cancel Pipeline Job

gitlab_cancel_pipeline_job

Cancel a running GitLab CI/CD job by job ID; set force to true to also stop jobs stuck in the canceling state.

Instructions

Cancel one running job. force=true also cancels a job stuck in the canceling state.

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": {
      "job_id": "<job_id>"
    },
    "name": "gitlab_cancel_pipeline_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
job_idYes
project_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.0
    • addedInput schema / properties / force
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  2. First observedv1.6.1

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the safety profile is partly covered. The description adds real value by explaining that force=true rescues a job stuck in the canceling state, which the annotations cannot convey. It omits what a repeated cancel does, what errors surface for a finished job, and whether cancellation is reversible, so it does not fully clear the lower annotation-enabled bar.

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?

Two short sentences, zero filler, with the core action front-loaded and the force nuance immediately after it. Nothing is repeated from the schema or annotations.

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 mutation tool with no output schema and no parameter documentation, the description should say what is returned, what happens on a non-running job, and how project scoping works. An agent calling this correctly would still be guessing about project_id and about failure modes.

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 0% across three parameters, so the description must compensate and largely does not: job_id and project_id are never mentioned, including how project_id defaults when omitted. Only force gets any semantic explanation, and even there the false/null default behavior is left unstated.

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?

"Cancel one running job" states a specific verb and resource, and the second sentence narrows behavior for the force case. It does not explicitly contrast with gitlab_cancel_pipeline or gitlab_erase_pipeline_job, so the agent must rely on the name alone to tell whole-pipeline cancellation apart from single-job cancellation.

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 explains what force does but never says when to prefer this tool over gitlab_cancel_pipeline, gitlab_erase_pipeline_job, or gitlab_retry_pipeline_job. There is no statement of prerequisites, required role/permission, or conditions under which cancellation would fail.

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