Skip to main content
Glama

Cancel a workflow run

cancel_run
Destructive

Stop a workflow run that is still going, like Cancel in the dashboard. Only when the person asks. Agent runs cannot be stopped from here.

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": {
      "run_id": "<run_id>"
    },
    "name": "cancel_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idYesThe workflow run_id or request id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true, so the risk profile is known. The description adds genuinely new context: the run must still be in progress, human consent is required, and agent runs are out of scope. It does not say whether termination is graceful or immediate, or what happens to partial work.

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 short sentences, each carrying a distinct constraint: what it does, the consent gate, and the scope limit. The action is front-loaded and nothing is wasted.

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?

For a one-parameter destructive tool with no output schema, the essential facts (precondition, consent, exclusion) are present and annotations carry the safety profile. Only the post-cancel state — whether the run is marked cancelled, whether partial output survives, and what is returned — is left unstated.

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% for the single run_id parameter, so the schema already explains that it accepts a workflow run_id or request id. The description adds nothing about the identifier's format or where to obtain it, which is acceptable but not value-adding.

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?

States a specific verb and resource (stop a workflow run) plus a precondition (it must still be running) and a scope exclusion (agent runs cannot be stopped here), which separates it from run_agent/agent-cancel territory. It does not name a sibling alternative such as retry_run, but the operation is unambiguous.

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?

'Only when the person asks' gives an explicit gating condition for when to invoke, and 'runs that are still going' excludes already-finished runs. No alternatives are named for the case where the target is an agent run, so the agent must infer that no tool here covers that.

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