---
title: "corestack_deployment_retry"
url: https://docs.corefinity.com/mcp/tools/corestack_deployment_retry
type: tool
last_updated: 2026-11-13
feature: deployments
related:
  - https://docs.corefinity.com/api/reference/deployments/retry-site-deployment.md
  - https://docs.corefinity.com/guides/sites/code-and-deployments/connect-a-repository.md
---
# corestack_deployment_retry

**Retry a deployment.** Run a failed deployment again. Scope: write. Long-running: answers with a task.

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

## When to use it

Run a failed deployment again.

Retrying a deployment that is not the site's newest puts its older commit live over the newer one. The tool refuses it
with `confirm` and a message naming both deployments. Show the person that message, and only once they agree, call again
with `confirm_older: true`. Retrying the newest deployment needs no confirmation.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `deployment_id` (integer, ≥ 1, required)
- `confirm_older` (boolean): required, as true, to retry a deployment that is not the site's newest

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_older": {
      "type": "boolean"
    },
    "deployment_id": {
      "minimum": 1,
      "type": "integer"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "deployment_id"
  ],
  "type": "object"
}
```

## Refusals

- `forbidden`: the person's role lacks the Retry Deployments permission. The message names it and says an owner of the
  company can grant it in Roles; `details.permission` is `retryDeployments`. Nothing is changed.
- `artifact_pruned`: this deployment's archive was removed after 30 days, so it can't be retried. Deploy again from the branch or commit (`corestack_deployment_trigger`). Archives are kept for 30 days, and always for a site's 10 most recent deployments and its newest successful one.
- `pipeline_changed_since_build`: this deployment's build finished, and its build lines or the variables the build reads changed after it. A Retry deploys the same built files and would skip the new build: "The pipeline changed after this build. Retry deploys the same built files; use Deploy again to run the new build." Deploy the same commit again instead (`corestack_deployment_trigger` with its commit as `ref`), which builds the pipeline as it is now. A change to the database or post-deploy lines alone does not refuse a Retry: those lines run anew.
- `not_failed`: only a failed deployment can be retried; this one did not fail.
- `release_not_live`: that release is not live; choose the live release.
- `confirm` (field `confirm_older`): this is not the site's newest deployment, so retrying it puts an older release live. The message names the commit and date of both; ask the person before you send `confirm_older: true`.
- `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_deployment_retry",
  "arguments": {
    "site_id": 4211,
    "deployment_id": 6610
  }
}
```

Once the person has agreed to put the older release live:

```json
{
  "name": "corestack_deployment_retry",
  "arguments": {
    "site_id": 4211,
    "deployment_id": 6604,
    "confirm_older": true
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_deployment_retry with site_id 4211, deployment_id 6610. (Retry a deployment.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/deployments/{deployment}/retry](https://docs.corefinity.com/api/reference/deployments/retry-site-deployment.md)
- Guide: [Connect a repository](https://docs.corefinity.com/guides/sites/code-and-deployments/connect-a-repository.md)
