MCP User, Role and Alert Tools¶
An administrator can manage user accounts and roles through the MCP, and any user with manage rights can mute alerts. Every tool that changes who can do what asks the person to confirm it in the MCP client first, as described in MCP Tool Results and Errors.
The user and role tools are refused for calls that come through the Remote Management Hub, and the Hub's MCP server does not list them (see MCP Calls Through the Hub).
Users¶
Every user tool needs an administrator and an access token approved for full access. To change an existing user, the model reads the user with get_object and sends the revision token it returned, so a user changed in the meantime is refused as stale.
| Tool | Confirmed | Does |
|---|---|---|
update_user |
No | Changes a user's name, email, phone, description, lock timeout, logout timeout and password Min Strength, from the choices the user page offers |
create_user |
Yes | Creates an enabled account with a password, temporary or not |
set_user_enabled |
Yes | Enables or disables an account |
delete_user |
Yes | Deletes an account |
set_user_password |
Yes | Sets a user's password, temporary or not |
set_user_zone_permissions |
Yes | Replaces a user's permissions in every zone |
set_user_administrator |
Yes | Grants or revokes the administrator flag |
set_user_role |
Yes | Assigns a role, or clears it |
set_management_api_token |
Yes | Sets the token the user's Management API requests carry, or clears it and turns the user's Management API access off |
Each change is checked against the rules the console's user page applies, such as a User ID of at least 3 characters, before the person is asked.
A new password must meet the same strength rule the Management API applies: the system's custom requirements when its minimum strength is Custom, otherwise the user's own minimum strength or the system's, and at least Medium for an administrator.
An administrator cannot delete, disable or revoke the administrator flag of their own account through the MCP; another administrator must do it. The built-in admin account is a protected local account: no MCP tool changes it at all. Change it in the console.
The Management API token is never returned. A token another user already holds is refused without saying who holds it.
Zone permissions¶
set_user_zone_permissions takes the whole list of zones the user has rights in, each zone once. For each zone, Edit includes Manage and View, and Manage includes View, so sending edit alone grants all three. Error stands alone and cannot be combined with the others. Alert sends the zone's alerts to the user. Global Settings always keeps View and never takes Manage or Error; when the list leaves Global Settings out, it is added with View. A user who has a role takes their permissions from the role, so the role must be cleared with set_user_role before the user's own permissions can be set.
An administrator keeps full permissions in every zone, as on the Manage Users page; from the list, only Alert is taken. set_user_administrator fills every zone's permissions and alerts when it grants the flag, and leaves only View on Global Settings when it revokes it. Roles follow the same rules. A user with a role takes the administrator flag and every permission from the role, so set_user_administrator and set_user_zone_permissions refuse that user. Clear the role with set_user_role first, or change the role with save_role.
Roles¶
save_role creates a role, or changes one when the model sends the revision token it read: its name, description, administrator flag and zone permissions, with the same rules as a user's. A property left out keeps its value. delete_role deletes a role. Both are confirmed.
Alerts¶
list_alerts returns, for an administrator, the alerts the console's Alerts button shows, each with whether the caller has muted it.
mute_alerts and unmute_alerts take one target:
| Target | Mutes |
|---|---|
alertText |
One administrator alert, for the caller only |
channelId |
One channel's error alerts |
zoneId |
The error alerts of every channel in one zone |
allChannels |
The error alerts of every channel in the zones the caller manages |
A channel mute lasts the number of minutes sent. Muting a channel or a zone needs manage rights in its zone. Muting is recorded in the MCP audit log but not confirmed, because it changes only which alerts are sent and is undone with unmute_alerts.