Rotate the principal key
rotate_principal_keyReplace your principal's principal_key and cut off every agent that should not keep access. Use it when the key may have leaked or when you want to revoke a group of agents at once. Returns the new key once. Needs your agent credentials and the current principal_key (argument or X-Principal-Key header). Returns the new key once; the old one stops working. Every agent registered under the previous key is revoked for good (AGENT_REVOKED) except you and the agents in keep_agent_ids (list_agents shows them); the result lists kept_agent_ids and revoked_agent_ids. A principal registered before keys existed has none: any of its agents can call this without principal_key to mint the first one, which revokes nobody.
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_principal_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | No | Your agent id (or X-Agent-Id header) | |
| agent_key | No | Secret returned by register_agent (or X-Agent-Key header) | |
| principal_id | No | The principal you act for (or X-Principal-Id header) | |
| principal_key | No | Current principal_key (or X-Principal-Key header) | |
| keep_agent_ids | No | Other agents of the principal to keep working (you are always kept) |