Skip to main content
Glama

cancel_workflow

Destructive

Cancel a running workflow run by runId, in the same work session. No further step starts; a running command is stopped, while a running file step or copy finishes first. Completed steps are not rolled back. Poll workflow_status until the run has ended: cancelled, or succeeded or failed when its last step was already running.

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": {
      "runId": "<runId>"
    },
    "name": "cancel_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
runIdYes
deviceIdNoComputer name or id
workSessionIdNoFrom create_work_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id; optional with one computer or a default"New value: +"Computer name or id"
  2. Changed2 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id from list_devices. Optional with one computer online or a default set."New value: +"Computer name or id; optional with one computer or a default"
    • changedInput schema / properties / workSessionId / description
      Previous value: -"Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work."New value: +"From create_work_session"
  3. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, so the bar is lower, but the description goes well beyond them: it discloses exactly what is stopped (a running command), what is allowed to finish (a running file step or copy), and that completed steps are not rolled back. It also names the terminal states the agent should expect via workflow_status. This is precisely the partial-effect information an agent needs before calling a destructive tool.

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?

Front-loaded with the action and target, then the semantics, then the verification loop — a logical order with no filler. Three sentences carry a lot of information at minimal cost, though the final sentence's phrasing ('succeeded or failed when its last step was already running') is dense enough to require a second read.

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 tells the agent how to observe the outcome (poll workflow_status) and what the possible end states are, and it covers partial-completion behavior for a destructive mutation. Remaining gap is minor: deviceId's role in targeting a run is not explained anywhere beyond the schema.

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 67%, so the schema already documents deviceId and workSessionId. The description reinforces runId as the run identifier and implies workSessionId scoping via 'in the same work session', but adds no format or constraint detail for any parameter. Baseline 3 is appropriate given the moderate coverage.

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?

The description opens with a specific verb and resource ('Cancel a running workflow run by runId') and adds scope ('in the same work session'), which separates it from definition-level siblings like delete_workflow. It never names an alternative cancellation/removal tool explicitly, so the differentiation is implied by the word 'running' rather than stated.

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?

It gives a clear condition for use (a run that is currently running) and an explicit follow-up loop: 'Poll workflow_status until the run has ended.' It stops short of stating when NOT to use it (e.g. deleting a saved workflow definition rather than a live run), so the exclusion is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources