---
title: "corestack_site_delete"
url: https://docs.corefinity.com/mcp/tools/corestack_site_delete
type: tool
last_updated: 2026-11-13
feature: sites
related:
  - https://docs.corefinity.com/api/reference/sites/delete-site.md
  - https://docs.corefinity.com/guides/sites/create-and-manage/site-overview.md
---
# corestack_site_delete

**Delete a site.** Delete a site (its production row): a final snapshot is kept where the cluster takes snapshots, the site is stopped and hidden, and it is purged after the grace period unless restored with corestack_site_restore_deleted. Delete its environments first. Scope: destructive. Long-running: answers with a task.

- Scope: `destructive`
- Confirmation: `confirm_domain`
- Runs as a task: yes

## When to use it

Delete a site (its production row): a final snapshot is kept where the cluster takes snapshots, the site is stopped and hidden, and it is purged after the grace period unless restored with corestack_site_restore_deleted. Delete its environments first.

A site whose create is still waiting for a tested version (`version_wait` on corestack_site_get) can be deleted too: the delete cancels the waiting create first, then deletes the site. Nothing had been installed, so the create's operation ends `Cancelled` (its task, if you are following one, ends `cancelled`), the site takes no final snapshot and there is no grace period: it cannot be restored, and its name is free again within the hour. If a tested version arrives at that very moment and the create has already started installing it, the delete answers `busy`; the create then carries on, and the site can be deleted once it is ready.

If external database access is on for the site or one of its environments, the delete turns it off first and then carries on by itself once access is off. The call then answers at once, and it is not an error: `{"operation": null, "queued": true, "reason": "external_db_delete_queued", "message": "Turning off external access, then deleting.", "turn_off_operation": {"id": 9123, "status_tool": "corestack_site_operation_get"}, "held_delete_id": 41}`. Follow the turn-off with its status tool if you want to; there is nothing else to send, and asking again while it waits gives the same answer.

## Inputs

- `site_id` (integer, ≥ 1, required): The site's id (its production row).
- `confirm_domain` (string, up to 253 characters, required): The site's domain, typed exactly.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_domain": {
      "description": "The site's domain, typed exactly.",
      "maxLength": 253,
      "type": "string"
    },
    "site_id": {
      "description": "The site's id (its production row).",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "confirm_domain"
  ],
  "type": "object"
}
```

## Refusals

- `wrong_row`: a production-row-only tool given an environment row, or the reverse; use the other tool or row.
- `provisioning`: the site is still being created; wait for corestack_site_provisioning_get to finish.
- `is_production`: the production row cannot take this call as given; check which row and which tool it needs.
- `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_site_delete",
  "arguments": {
    "site_id": 4211,
    "confirm_domain": "example.co.uk"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_site_delete with site_id 4211. (Delete a site.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [DELETE /api/corestack/sites/{site}](https://docs.corefinity.com/api/reference/sites/delete-site.md)
- Guide: [Site overview](https://docs.corefinity.com/guides/sites/create-and-manage/site-overview.md)
