Manage secrets
manage_secretsCreate or change secrets; previous values always stay in the version history and no value is ever echoed back. Deleting a secret is delete_item. action set: create one key or replace its value in one environment; kind and note are kept unless passed, and expectedVersion (from list_project_items item secrets) writes only if nobody changed the key since. action import: create or update many keys in one environment from dotenv text (KEY=value lines); existing keys are kept unless overwrite is true, and protected, sealed, invalid or out-of-limit keys are skipped and named. action copy: copy keys from one environment to another without the values passing through you (the server re-encrypts them); run find_secret_keys action diff first; existing target keys are kept unless overwrite. action restore: make an earlier version (from find_secret_keys action history) the new current value; the replaced value stays in history, so a restore can be undone. Protected and sealed keys are refused for set and restore, skipped and named for import and copy. Audited. Requires secrets:write and the editor role; copy also needs secrets:read on the source and restore secrets:read on the key.
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": {
"action": "<action>",
"project": "<project>"
},
"name": "manage_secrets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | copy only: the target environment | |
| key | No | set, restore: the key | |
| from | No | copy only: the source environment | |
| keys | No | copy only: only these keys (default: all) | |
| kind | No | set, import: secret (masked, the default for a new key) or plain (shown unmasked, for non-sensitive settings). Omit it to keep a key's current kind | |
| note | No | set only: short note shown next to the key, up to 500 characters. Omit it to keep the current note | |
| text | No | import only: dotenv text, KEY=value per line, up to 256 KB; comments and blank lines are ignored | |
| value | No | set only: the value to store, up to 64 KB, encrypted at rest | |
| action | Yes | What to do | |
| project | Yes | Project slug or id | |
| version | No | restore only: the version number to bring back, as find_secret_keys action history lists it; must be older than the current one | |
| overwrite | No | import, copy: replace existing values (each replaced value stays in the version history). Default false | |
| environment | No | set, import, restore: the environment written | |
| expectedVersion | No | set only: update only if the key is still at this version; a changed, renamed or deleted key fails instead of being written over or created |