---
title: "corestack_enterprise_deployment_cancel"
url: https://docs.corefinity.com/mcp/tools/corestack_enterprise_deployment_cancel
type: tool
last_updated: 2026-11-13
feature: enterprise-deployments
related:
  - https://docs.corefinity.com/guides/corestack-enterprise/deployments-and-pipelines.md
---
# corestack_enterprise_deployment_cancel

**Cancel a CoreStack Enterprise deployment.** Cancel a CoreStack Enterprise deployment that has not finished (queued, waiting or running). Scope: write.

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

## When to use it

Cancel a CoreStack Enterprise deployment that has not finished: queued, waiting to be deployed, running, or a legacy
scheduled one. This is the deployments list's Cancel and the deployment page's Stop. A running deployment stops at its
current step and its crons are put back. The answer is the deployment's row.

The public API's `POST /api/environments/{environment}/deployments/{deployment}/cancel` answers the same.

## Inputs

- `enterprise_env_id` (integer, ≥ 1, required)
- `deployment_id` (integer, ≥ 1, required)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "deployment_id": {
      "minimum": 1,
      "type": "integer"
    },
    "enterprise_env_id": {
      "description": "A CoreStack Enterprise environment's id; for CoreStack or CoreCluster use the corestack_deployment_* tools.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "enterprise_env_id",
    "deployment_id"
  ],
  "type": "object"
}
```

## Refusals

- `stale`: the deployment has already finished ("Only a deployment that has not finished can be cancelled."), or it
  moved on since it was read. Read it again.
- `busy`: the same cancellation is still being applied. `forbidden`: the person's role lacks the Cancel Deployments
  permission. The message names it and says an owner of the company can grant it in Roles; `details.permission` is
  `cancelDeployments`.
- `invalid_arguments` (field `enterprise_env_id`): a CoreStack or CoreCluster environment; use
  `corestack_deployment_stop` by `site_id`.
- `tenant_mismatch`, `pin_refused`, and the refusals every tool can answer: `scope_required`, `rate_limited`,
  `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_enterprise_deployment_cancel",
  "arguments": {
    "enterprise_env_id": 1530,
    "deployment_id": 185190
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_enterprise_deployment_cancel with enterprise_env_id 1530, deployment_id 185190. (Cancel a CoreStack Enterprise deployment.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Deployments and pipelines](https://docs.corefinity.com/guides/corestack-enterprise/deployments-and-pipelines.md)
