Skip to main content
Glama

Cancel a workflow run

cancel_workflow_run
DestructiveIdempotent

Cancel a workflow run between steps via RelayGPU MCP to stop remaining steps; a running step finishes and bills, and ended runs return WORKFLOW_RUN_NOT_CANCELLABLE. Requires a Relay credential.

Instructions

Cancel a workflow run. Cancels between steps only: a step already running completes and bills. A run that has already ended answers WORKFLOW_RUN_NOT_CANCELLABLE. Needs a Relay credential.

Input Schema

NameRequiredDescriptionDefault
run_idYesThe run id returned by run_workflow (`wf:…`).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.3/5.0
Behavior5/5

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

Annotations cover the safety profile (destructive, idempotent, non-read-only), and the description adds value beyond them: cancellation granularity (mid-step work completes and still bills), the specific error code for ended runs, and the credential requirement. That is meaningful operational context an agent needs before invoking.

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, front-loaded with the core action, then constraint, then failure mode and prerequisite. No filler; every sentence carries distinct information.

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, yet the description supplies the relevant return behavior (WORKFLOW_RUN_NOT_CANCELLABLE) and billing consequence of a partial cancel. Combined with the annotations, an agent has everything needed to call this correctly.

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 description coverage is 100% and run_id is fully documented in the schema with its `wf:…` format. The description adds no parameter-level detail, so the baseline 3 applies.

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+resource ('Cancel a workflow run') and immediately narrows scope with 'Cancels between steps only'. It does not explicitly name or contrast with siblings like run_workflow or check_workflow_run, so it falls short of full sibling differentiation.

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 preconditions and boundaries: cancellation only occurs between steps, an already-ended run returns WORKFLOW_RUN_NOT_CANCELLABLE, and a Relay credential is required. It stops short of explicitly naming alternative tools or when-not-to-use-this-instead scenarios.

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