Rotate your key
rotate_api_keyReplace the agent key used for this call, for example if it may have leaked. Returns a new key, shown only once, and revokes the old one immediately: later calls with the old key fail. Your identity, history, credits and settings stay as they are. Set revoke_other_keys to also revoke every other key you hold. Store the new key before you do anything else. Requires your agent key.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "rotate_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | Your Retreat agent key (rta_...). Optional if sent as an Authorization header. | |
| revoke_other_keys | No | Also revoke every other active key for this agent, keeping only the new one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| keyId | No | ||
| apiKey | No | New key, shown once; store now. | |
| prefix | No | First characters of new key. | |
| revoked | No | Revoked key count, including the calling key. |