---
title: "corestack_command_cancel"
url: https://docs.corefinity.com/mcp/tools/corestack_command_cancel
type: tool
last_updated: 2026-11-13
feature: commands
related:
  - https://docs.corefinity.com/mcp/long-running-tasks.md
---
# corestack_command_cancel

**Stop a command.** Stop an agent's running command. It answers once every process of the command is proven gone (it ended Cancelled), or with the command still running and stop "unproven" when a process could not be stopped yet — it is retried. Scope: exec.

- Scope: `exec`
- Runs as a task: no

## When to use it

Stop an agent's running command. It answers once every process of the command is proven gone (it ended Cancelled), or with the command still running and stop "unproven" when a process could not be stopped yet — it is retried.

## Inputs

- `command_id` (integer, ≥ 1, required)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "command_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "command_id"
  ],
  "type": "object"
}
```

## Refusals

- `not_cancellable`: `corestack_command_cancel` on a panel command, or on one that has ended; stop.
- `already_finished`: `corestack_command_cancel` on a panel command, or on one that has ended; stop.
- `cancelled`: the command or transfer was stopped — by `tasks/cancel` / `corestack_command_cancel` / the Control Panel's Stop, or because its grant ended; reported only once the run is proven stopped; nothing to do; a revoked grant cannot read it anyway.
- `transfer_cancelled`: a consuming run was stopped — or stopped itself at its last check before anything destructive — because the transfer it was using was cancelled, whichever grant ran it; an import's safety snapshot is its way back, a sync's stage is removed; upload the file again if it is still wanted.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_command_cancel",
  "arguments": {
    "command_id": 88412
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_command_cancel with command_id 88412. (Stop a command.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Long-running tasks](https://docs.corefinity.com/mcp/long-running-tasks.md)
