pii_rotate_key
Rotate the PII vault encryption key: re-encrypt stored mappings with a new key, write it to the local key file, and invalidate the previous key for existing sessions.
Instructions
Rotate the PII vault encryption key (Step 102, ADR-102): re-encrypts all existing mappings with a new key and writes it to the local key file, making the previous key invalid for existing sessions. Optional newKey supplies the key material; a random key is generated when omitted (mirrors CLI rotate-key --new-key). Returns ok:false with an error when no encryption key is configured.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newKey | No | Optional new key material (auto-generated when omitted) | |
| confirm | Yes | mandatory acknowledgement that this call mutates state; the tool writes nothing unless it is true (D5-08, D5-12) |