vault_new_key
Create a new service API key using an existing vaulted credential, then store the new key in the owner’s vault for passkey approval so agents never see it.
Instructions
Make a NEW key at a service (for example a new API key at Resend or Cloudflare), using a vaulted key that is allowed to create keys there. The helper sends your request, takes the new key out of the answer and puts it straight into the owner's vault, where it waits for the owner. You never see the new key: you get its id and name at the service. No agent can use it until the owner saves it with their passkey and sets it up, so tell the owner it is waiting under Needs you.
Works only at these exact addresses (POST): Resend https://api.resend.com/api-keys; Cloudflare https://api.cloudflare.com/client/v4/user/tokens and /client/v4/accounts/{account_id}/tokens; SendGrid https://api.sendgrid.com/v3/api_keys; OpenAI https://api.openai.com/v1/organization/admin_api_keys and /v1/organization/projects/{project_id}/service_accounts; Twilio https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Keys.json; OpenRouter https://openrouter.ai/api/v1/keys. vault_call refuses these addresses. Anywhere else, the owner makes the key and adds it to the vault by hand.
ROTATING a key: pass replaces_entry_id (the secret the new key replaces). The order is: (0) list the keys at the service and note the id of the OLD key, the one in use now; (1) vault_new_key, giving the new key the same permissions; (2) tell the owner and wait until they press Replace; (3) make a harmless call with that secret to prove the new value works; (4) only then delete the OLD key at the service with vault_call (DELETE, by the OLD id you noted, never the id vault_new_key returned); (5) tell the owner. Never delete the old key before the new one has worked. Rolling a token in place (Cloudflare PUT .../tokens/{token_id}/value) is refused: it ends the old value at once.
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": {
"entry_id": "<entry_id>",
"request": "<request>",
"save_as": "<save_as>",
"purpose": "<purpose>"
},
"name": "vault_new_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| purpose | Yes | Why this is needed (audit log, and shown to the owner). | |
| request | Yes | As for vault_call: {origin:{scheme:"https",host,port:443}, method:"POST", path, body?, headers?}. The body is what the service wants for a new key (its name, permissions). | |
| save_as | Yes | Name for the new secret in the vault, 1 to 80 characters. | |
| entry_id | Yes | Vault entry holding the key that is allowed to create keys at the service. | |
| replaces_entry_id | No | Optional. The entry id of the secret this new key replaces (one you have). The owner can then replace its value in one step; its name, rules and agents stay as they are. |