Skip to main content
Glama

Cancel a workflow run

cancel_workflow_run
DestructiveIdempotent

Cancel a pending or running Actions workflow run by owner, repo, and run_id; then inspect the returned status to confirm whether it was cancelled.

Instructions

Cancel a pending or running Actions workflow run (owner/repo/run_id; requires write mode), on Forgejo 16+ or Gitea. Answers with the run as it now stands, in list_workflow_runs' shape — read the outcome from its status. Forgejo accepts a run that had already finished and leaves it as it was, so the returned status is what says whether anything was cancelled; Gitea may refuse one instead.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name.
ownerYesRepository owner — user or organization.
run_idYesWorkflow run id (the `id` field from `list_workflow_runs`).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the response is the run in list_workflow_runs' shape, that the outcome must be read from `status`, and that Forgejo silently accepts an already-finished run unchanged while Gitea may refuse it. That platform-divergent semantics is exactly the context annotations cannot convey, and it is consistent with idempotentHint=true and destructiveHint=true.

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?

Three sentences, front-loaded with the action and its prerequisites, then the return contract, then the platform-specific edge case. No filler; each clause carries information an agent would otherwise have to discover by trial.

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

Completeness5/5

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

No output schema exists, and the description compensates fully by describing the return value's shape, the field to inspect, and how that field behaves differently across Forgejo and Gitea. Nothing needed to invoke or interpret the result is missing.

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 100% and each parameter is documented in the schema, so the baseline is 3. The description's 'owner/repo/run_id' mention merely restates the parameters without adding format or constraint detail beyond what the schema already says.

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?

Specific verb plus resource plus scope: 'Cancel a pending or running Actions workflow run'. This clearly separates it from get_workflow_run (read), rerun_workflow (re-execute), and dispatch_workflow (start), so an agent can choose it without opening the schemas.

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 real preconditions — 'requires write mode', 'on Forgejo 16+ or Gitea', and restricts the target to 'pending or running' runs. It does not explicitly name sibling alternatives or say when not to use it, 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.