CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 39 of 65

corestack_deployments_company_variable_set

Set a company deployment variable.

Scope writeNo secrets returned
On this page

When to use it

Create or change one of your company's deployment variables, which its sites' three-stage environments receive as CF_<name> when their deployments are built, unless an environment sets the name itself. Send value, shared_with_managed or both; a new name needs a value. shared_with_managed matters only for an agency: the value then also reaches the builds of the sites it manages for clients, whose users can run commands there. The value is write-only: it is never shown again here. A token restricted to some sites cannot change company variables.

The same action in the public REST API, with the same checks, refusals and scope: PUT /api/corestack/companies/{company}/deploy-variables/{name}.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_deployments_company_variable_set with name SLACK_WEBHOOK, value <the webhook address>, shared_with_managed false. (Set a company deployment variable.) Tell me what it returned.

Inputs

namestringRequired

Without the CF_ prefix.

shared_with_managedboolean

An agency only: also the sites it manages for clients.

valuestring

Up to 2,048 characters.

Example call

tools/call
{
  "name": "corestack_deployments_company_variable_set",
  "arguments": {
    "name": "SLACK_WEBHOOK",
    "value": "<the webhook address>",
    "shared_with_managed": false
  }
}

If it is refused

ReasonWhat to do
forbiddenThe person's role lacks the Edit Environment Deployment Pipeline permission, which every change to the company's templates, variables and registry secrets needs (they reach every environment that follows the template). The message names it and says an owner of the company can grant it in Roles; details.permission is editEnvironmentDeploymentPipeline. Nothing is changed.
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 it as CF_<name>, so the tool never reads it. The message says so and points at Private registries; save the credentials with corestack_deployments_company_secret_set instead. An existing one is kept and can still be changed or deleted.
variable_invalidThe name starts with CF_, the value has a line break, a control character or is too long, or a new name was sent without a value.
too_many_variablesThe company already holds the most variables it can (100); delete one first.
invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
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