Add a write-only secret to a workspace's vault
set_vault_secretStores an encrypted, write-only secret in a workspace vault for use via opaque handles in code and integrations; requires confirmation and a pre-created vault.
Instructions
Stores a secret in the workspace's vault. WRITE-ONLY: the value is encrypted server-side and can never be read back — not by this tool, not by block code, not by you. Block code gets an opaque handle . that the server dereferences at the point of use (sql.query, a fetch header, a {{Vault.secret}} URL placeholder, crypto.hmacSha256), and logs show ***. kind:"string" for a token/password/API key; kind:"connection" for a database connection string, which also needs provider (postgres|sqlserver|oracle|mysql|sqlite). Requires confirm=true. NEVER invent a secret value — ask the user for it. Create the vault first with create_vault. Only the workspace OWNER can.
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": {
"workspaceId": "<workspaceId>",
"name": "<name>",
"kind": "<kind>",
"value": "<value>"
},
"name": "set_vault_secret"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | "string" for a token/password; "connection" for a DB connection string. | |
| name | Yes | Secret name as referenced in code, e.g. "prodDb" → MyVault.prodDb. | |
| value | Yes | The secret itself. Stored encrypted; never readable again. Get it from the user. | |
| confirm | No | Must be true to store the secret. Omit/false returns a preview only. | |
| provider | No | Required for kind:"connection" — which database the connection string targets. | |
| workspaceId | Yes |