Unset Environment Variable or Secret
secrets_unsetDeletes one environment variable or secret from an app, like deleting
it on the dashboard's Environment page. Takes the app_id from
apps_list, the key, and the scope it was set in: app for an
entry shared by every environment, environment with
environment_id for an entry of that environment only. Call
secrets_list (with environment_id) to see which scope a key
lives in.
A key that is not set in that scope answers deleted: false and
changes nothing. A key set for every environment cannot be deleted
through scope: environment: the call is refused and says so, and
nothing is deleted.
Removing an override: when the key overrides a variable Meridian
manages (managed_variables_list reports it overridden; the
variables of a ready add-on, such as REDIS_HOST, and the DB_HOST,
DB_PORT and DB_SSL_CA of a database reached over TCP count too),
deleting it gives that variable back to Meridian, and
restores_managed lists the environments where it happens. When
override_value is same, the app keeps the same value and the call
goes through. When it is different or unknown (always unknown
for an add-on or database transport variable), the app would run with
another value, so the call is refused until you pass confirm: true.
This holds when a key set for every environment takes over from the
deleted one too: restores_managed is then empty.
The change reaches the app at its next deploy: environments_list
reports config_pending_deploy.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app_id": "<app_id>",
"key": "<key>",
"scope": "<scope>"
},
"name": "secrets_unset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The variable name to delete. Uppercased and normalized. | |
| scope | Yes | Where the key is set: `app` for every environment, `environment` for `environment_id` only. | |
| app_id | Yes | The app uuid returned by `apps_list`. | |
| confirm | No | Pass `true` to delete a key that overrides a variable Meridian manages with a different (or uncomparable) value: the app then runs with another value from its next deploy. | |
| environment_id | No | Required when `scope` is `environment`: the environment uuid from `environments_list`. | |
| organization_id | No | An organisation uuid or slug. When supplied, `app_id` is resolved within that organisation and may be a slug instead of a uuid, mirroring the Meridian web app. |