CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 19 of 65

corestack_deployments_variable_set

Set a deployment variable.

Scope writeNo secrets returned
On this page

When to use it

Create or change one of the environment's deployment variables, which every stage receives as CF_<name>. Send value, log_visibility or both. The value is write-only: it is never shown again here.

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

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_deployments_variable_set with site_id 4211, name API_URL, value https://api.example.com, log_visibility shown. (Set a deployment variable.) Tell me what it returned.

Inputs

log_visibilitystring

hidden (default) masks it in deployment output.

hiddenshown
namestringRequired

Without the CF_ prefix.

site_idintegerRequired

At least 1.

valuestring

Up to 2,048 characters.

Example call

tools/call
{
  "name": "corestack_deployments_variable_set",
  "arguments": {
    "site_id": 4211,
    "name": "API_URL",
    "value": "https://api.example.com",
    "log_visibility": "shown"
  }
}

If it is refused

ReasonWhat to do
variable_reservedThat name is reserved for a value the platform sets.
variable_tool_credentialA new variable named as a build tool's credential (COMPOSER_AUTH, NPM_TOKEN, NODE_AUTH_TOKEN, YARN_NPM_AUTH_TOKEN, GITHUB_TOKEN, GITLAB_TOKEN, BITBUCKET_TOKEN, in any case; details.field is name). Builds receive every variable as CF_<name>, so the tool would never read it: "Builds see this variable as CF_COMPOSER_AUTH, so Composer never reads it. Add the credentials under Deployments > Private registries instead." Save the credentials with corestack_deployments_secret_set instead. An existing variable of such a name is kept and can still be changed or deleted; the list marks it with the same sentence as its tool_credential.
variable_invalidThe value has a line break, a control character or is too long.
invalid_argumentslog_visibility: shown without a value, for a variable whose stored value is hidden (showing it would reveal it): "Send the value with log_visibility shown. A stored value is read only through its reveal."
managed_elsewhereAnother 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.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT