Skip to main content
Glama

jamjet_cancel_execution

Cancel a running or paused workflow execution when it is stuck, no longer needed, or started with incorrect input. This irreversible action marks the execution cancelled.

Instructions

Cancel a running or paused workflow execution. This is an irreversible, destructive operation. Side effects: appends a WorkflowCancelled event to the execution's event log and sets the status to 'cancelled'. The execution cannot be resumed after cancellation — start a new execution with jamjet_run_workflow if needed. Use this when a workflow is stuck, no longer needed, or was started with incorrect input. Returns a JSON object with execution_id and status 'cancelled'. Fails if the execution is already in a terminal state (completed, failed, or cancelled) or if the execution_id is not found.

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": {
      "execution_id": "<execution_id>"
    },
    "name": "jamjet_cancel_execution"
  }
}

Input Schema

NameRequiredDescriptionDefault
tenant_idNoTenant partition. Defaults to 'default'. Must match the tenant used when the execution was created. Outside dev mode the tenant is the API token's tenant and a different value is refused.
execution_idYesExecution ID to cancel. Accepts 'exec_<uuid>' or bare UUID format. The execution must be in 'running' or 'paused' state.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.7
    • changedInput schema / properties / tenant_id / description
      Previous value: -"Tenant partition. Defaults to 'default'. Must match the tenant used when the execution was created."New value: +"Tenant partition. Defaults to 'default'. Must match the tenant used when the execution was created. Outside dev mode the tenant is the API token's tenant and a different value is refused."
  2. Addedv0.8.2
  3. Removedv0.8.1
  4. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / execution_id / description
      Previous value: -"Execution ID"New value: +"Execution ID to cancel. Accepts 'exec_<uuid>' or bare UUID format. The execution must be in 'running' or 'paused' state."
    • changedInput schema / properties / tenant_id / description
      Previous value: -"Tenant ID (default: default)"New value: +"Tenant partition. Defaults to 'default'. Must match the tenant used when the execution was created."
  5. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations present, the description carries the full behavioral burden and does so: it declares the operation irreversible and destructive, names concrete side effects (WorkflowCancelled event appended, status set to 'cancelled'), states the execution cannot be resumed, and enumerates failure modes. This is materially more than the schema provides.

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?

Five tight sentences, front-loaded with purpose and irreversibility, then side effects, then recovery, then triggers, then return and failure modes. Each sentence contributes a distinct fact; none is filler.

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?

There is no output schema, so the description correctly closes that gap by describing the return object (execution_id plus status 'cancelled'). Combined with side effects, failure conditions, and recovery advice, an agent has everything needed to call this destructive tool safely.

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%, so both execution_id and tenant_id semantics (format, defaults, tenant-matching rule) are already fully documented in the schema. The description says the execution must be running or paused, but that constraint is also already in the schema, so it adds no new parameter meaning beyond the baseline.

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 and resource ('Cancel a running or paused workflow execution') with the exact precondition scope (running or paused). It is trivially distinguishable from siblings like jamjet_run_workflow or jamjet_get_execution, which are named or clearly different in action.

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

Usage Guidelines5/5

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

Gives explicit when-to-use triggers ('stuck, no longer needed, or was started with incorrect input'), an explicit alternative ('start a new execution with jamjet_run_workflow'), and explicit when-not conditions (already terminal, execution_id not found). Nothing about tool selection 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.