add_account
Add a shared 2FA account from a Base32 secret or otpauth:// link and assign it to groups from list_groups, so agents can generate its TOTP codes by id later.
Instructions
Adds one shared 2FA account from its secret and puts it in the chosen groups. Call list_groups first: only groups from list_groups are accepted, and a token limited to groups must put the account in at least one of them. All or nothing: if any input or group id is refused, nothing is added. Returns the new account's id, name, issuerDomain and groups, never a code: call get_otp with the id to read one. Errors start with a code, for example GROUP_REQUIRED or SECRET_INVALID.
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": {
"secret": "<secret>"
},
"name": "add_account"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the account, usually the service it signs in to. Required unless secret is an otpauth:// link with an issuer or label. | |
| secret | Yes | The 2FA secret: a Base32 key, or an otpauth:// link from the setup QR code. One account per call: a Google Authenticator export link (otpauth-migration://) is refused. | |
| group_ids | No | Ids of the groups to add the account to, from list_groups. Optional for an unscoped token; at least one for a token limited to groups. Each id once. | |
| description | No | Optional notes about the account. | |
| issuer_domain | No | Optional domain of the service, for example github.com. Looked up from the name when left out. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| name | No | ||
| error | No | ||
| groups | No | ||
| issuerDomain | No |