Update User's Nickname
Updates a user's nickname, given their user ID and the new nickname.
| Property | Value |
|---|---|
| Ability slug | mosmcp/update-user-nickname |
| Wire tool name | mosmcp__update-user-nickname |
| Category | Users & Roles (mosmcp-users) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_users |
| Minimum default role | Administrator |
| Annotations | readOnly: false · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer (min 1) | Yes | — | The user ID to update (required). |
| nickname | string | Yes | — | The new nickname (required). |
Output schema
| Field | Type | Required |
|---|---|---|
| id | integer | |
| username | string | |
| string | ||
| display_name | string | |
| first_name | string | |
| last_name | string | |
| nickname | string | |
| roles | string[] | |
| registered | string | |
| website_url | string | |
| biography | string | |
| locale | string |
Example
Sample prompt
Set user #42's nickname to 'JD'.
Example request (json)
{
"jsonrpc": "2.0",
"id": 204,
"method": "tools/call",
"params": {
"name": "mosmcp__update-user-nickname",
"arguments": {
"input": {
"id": 42,
"nickname": "JD"
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 204,
"result": {
"isError": false,
"structuredContent": {
"id": 42,
"username": "janedoe",
"email": "jane@example.com",
"display_name": "Jane Doe",
"first_name": "Jane",
"last_name": "Doe",
"nickname": "JD",
"roles": [
"editor"
],
"registered": "2025-03-14 09:21:07",
"website_url": "https://example.com",
"biography": "Managing editor.",
"locale": "en_US"
}
}
}
Edge cases / errors
- No user with that id → mosmcp_user_not_found; no edit rights over that user → mosmcp_cannot_edit.
- nickname is sanitized as plain text; an empty value may be refused by WordPress, which requires a nickname.
| << Previous | Next >> |
|---|---|
| Update User's Last Name | Update User's Website URL |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.