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

**Delete a registry secret.** Delete one of the environment's registry secrets. Builds that install from that registry then fail. Scope: write.

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

## When to use it

Delete one of the environment's registry secrets. Builds that install from that registry then fail.

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

## Inputs

- `site_id` (integer, ≥ 1, required)
- `secret_id` (integer, ≥ 1, required)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "secret_id": {
      "minimum": 1,
      "type": "integer"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "secret_id"
  ],
  "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_secret_delete",
  "arguments": {
    "site_id": 4211,
    "secret_id": 318
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_deployments_secret_delete with site_id 4211, secret_id 318. (Delete a registry secret.) Tell me what it returned.
```

## The same task elsewhere

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