jamjet_cancel_execution
Cancel a running or paused workflow execution. This irreversible operation appends a WorkflowCancelled event and sets status to 'cancelled'. Use when a workflow is stuck or no longer needed.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| execution_id | Yes | Execution ID to cancel. Accepts 'exec_<uuid>' or bare UUID format. The execution must be in 'running' or 'paused' state. | |
| tenant_id | No | Tenant partition. Defaults to 'default'. Must match the tenant used when the execution was created. |