---
title: "corestack_enterprise_variable_delete"
url: https://docs.corefinity.com/mcp/tools/corestack_enterprise_variable_delete
type: tool
last_updated: 2026-11-13
feature: enterprise-variables
related:
  - https://docs.corefinity.com/guides/corestack-enterprise/environment-variables.md
---
# corestack_enterprise_variable_delete

**Delete a CoreStack Enterprise build variable.** Delete one of a CoreStack Enterprise environment's build variables. Its deployments then receive no CF_<name>: corestack_enterprise_variables_list says which stages read it. Scope: write.

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

## When to use it

Delete one of a CoreStack Enterprise environment's build variables: the Environment Variables editor's Delete. Its
deployments then receive no `CF_<name>`: read `corestack_enterprise_variables_list` first, whose `used_in` says which
stages read it, and ask the person. The answer is `{deleted: true}`. For a CoreStack or CoreCluster site, use
`corestack_deployments_variable_delete` by `site_id` instead.

The public API's `DELETE /api/environments/{environment}/variables/{name}` does the same.

## Inputs

- `enterprise_env_id` (integer, ≥ 1, required)
- `name` (string, required): the variable's name from `corestack_enterprise_variables_list`, as it was saved. A variable
  saved before today's name rules (with a hyphen, say) can still be deleted by that name.

### Input schema

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

## Refusals

- `invalid_arguments` (field `enterprise_env_id`): a CoreStack or CoreCluster environment; use the
  `corestack_deployments_*` tools by `site_id`.
- `tenant_mismatch` ("Not found."): the environment does not exist, is not the person's, or is hidden from them; and a
  name the environment has no variable of. Both answers are the same, so read `corestack_enterprise_variables_list` to
  tell them apart.
- `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_variable_delete",
  "arguments": {
    "enterprise_env_id": 1530,
    "name": "API_URL"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_enterprise_variable_delete with enterprise_env_id 1530, name API_URL. (Delete a CoreStack Enterprise build variable.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Environment variables](https://docs.corefinity.com/guides/corestack-enterprise/environment-variables.md)
