---
title: "corestack_deployments_variable_delete"
url: https://docs.corefinity.com/mcp/tools/corestack_deployments_variable_delete
type: tool
last_updated: 2026-11-13
feature: deployment-variables
related:
  - https://docs.corefinity.com/api/reference/deployments/delete-site-deployment-variable.md
  - https://docs.corefinity.com/guides/sites/code-and-deployments/variables-and-secrets.md
---
# corestack_deployments_variable_delete

**Delete a deployment variable.** Delete one of the environment's deployment variables. Lines that use it then receive no value: corestack_deployments_variables_list says where it is used. Scope: write.

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

## When to use it

Delete one of the environment's deployment variables. Lines that use it then receive no value: `corestack_deployments_variables_list` says where it is used.

The same action in the public REST API, with the same checks, refusals and scope: `DELETE /api/corestack/sites/{site}/deployments/variables/{name}`.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `name` (string, matching `^[A-Za-z_][A-Za-z0-9_]{0,63}$`, required)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "name": {
      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "name"
  ],
  "type": "object"
}
```

## Refusals

- `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_deployments_variable_delete",
  "arguments": {
    "site_id": 4211,
    "name": "API_URL"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_deployments_variable_delete with site_id 4211, name API_URL. (Delete a deployment variable.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [DELETE /api/corestack/sites/{site}/deployments/variables/{name}](https://docs.corefinity.com/api/reference/deployments/delete-site-deployment-variable.md)
- Guide: [Variables](https://docs.corefinity.com/guides/sites/code-and-deployments/variables-and-secrets.md)
