Skip to main content
Glama

cancel_pipeline

Destructive

Stop a running CI/CD pipeline when a build must be halted; preview with dry_run first because cancellation is irreversible and the prior status is recorded.

Instructions

[WRITE][risk=medium] Cancel a running pipeline.

Reads the pipeline first so priorState records the status it had before the cancel. Irreversible (the stopped run cannot be resumed) — no undo. Pass dry_run=True to preview.

Args: project: Project id or full path. pipeline: Pipeline id (from list_pipelines). dry_run: If True, preview without canceling. target: Server target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
dry_runNo
projectYes
pipelineYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and non-idempotent, but the description adds genuinely new behavior: it performs an internal read so priorState captures the pre-cancel status, the action is irreversible with no undo, and dry_run provides a preview path. These are traits an agent cannot infer from the annotation block alone.

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?

Front-loads the verb, the write/risk tag, and the irreversibility warning before the structured Args block. Every sentence carries information; 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?

With no output schema, the description still conveys the key outcome (priorState capture, irreversible stop) and the dry-run escape hatch, which is sufficient for a mutation tool whose annotations cover the safety profile. It omits permission/authorization requirements and what the cancel response returns, leaving a small gap.

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 0%, so the description carries the full burden and does so for all four parameters: project (id or full path), pipeline (id, sourced from list_pipelines), dry_run, and target (server target from config, omit for default). Only minor detail is missing (e.g. exact id format), keeping it at 4 rather than 5.

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 specific verb+resource ('Cancel a running pipeline') and is instantly distinguishable from siblings like retry_pipeline, list_pipelines, and pipeline_detail. The [WRITE][risk=medium] tag further disambiguates the operation class.

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

Usage Guidelines4/5

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

Gives clear operational context: how to obtain the pipeline id ('from list_pipelines') and that dry_run=True previews before committing. It does not explicitly state when-not to use it versus alternatives such as retry_pipeline, so it falls just short of a 5.

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