restore_secret
Roll a secret back to an earlier version — the undo for a bad write. The stored ciphertext is replayed as a NEW version, so history is append-only and nothing is overwritten. Read list_secret_versions first to choose the version. No decryption happens, which is why this works here and not only on the local crypto plane. Returns { ok, name, restoredFrom, version } where version is the new head.
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": "<app>",
"env": "<env>",
"name": "<name>",
"version": "<version>"
},
"name": "restore_secret"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | Application slug or id, as returned by list_apps (e.g. "storefront"). | |
| env | Yes | Environment slug or id within that application, as returned by list_envs (e.g. "production"). | |
| org | No | Organization slug or id. Omit it when the credential can reach exactly one org — that org is used automatically. With several, the error names every slug you may pass; list them yourself with list_orgs. | |
| name | Yes | The secret's name — the variable name it is injected as, e.g. "DATABASE_URL". Names come from list_secrets; this is never a value. | |
| version | Yes | The version number to restore, taken from list_secret_versions. Its ciphertext becomes a new version on top of history — the old version is not removed. |