Set Secrets
set_secretsCreate, update, or delete Cloudflare Worker secrets without editing code or bindings; all changes deploy immediately in one new version.
Instructions
Create, update or delete secrets on a Worker without touching its code or other bindings. All changes land in ONE new version, deployed immediately. Pass a string to set a secret and null to delete it. Values are never echoed back. Secret values pass through the conversation, so for highly sensitive values prefer wrangler secret put.
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": {
"script_name": "<script_name>",
"secrets": "<secrets>"
},
"name": "set_secrets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| secrets | Yes | Map of secret name -> value. A string creates or updates a secret_text binding, null deletes it, and names not listed are left unchanged. All changes land in ONE new version that is deployed immediately. | |
| script_name | Yes | The name of the Worker script |