Update User's Email Address


Updates a user's email address, given their user ID and the new user_email.

Property Value
Ability slug mosmcp/update-user-email
Wire tool name mosmcp__update-user-email
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).
user_email string Yes — The new email address (required).

 

Output schema

Field Type Required
id integer
username string
email 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
Update user #42's email address to jane.doe@example.com.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 201,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__update-user-email",
    "arguments": {
      "input": {
        "id": 42,
        "user_email": "jane.doe@example.com"
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 201,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 42,
      "username": "janedoe",
      "email": "jane.doe@example.com",
      "display_name": "Jane Doe",
      "first_name": "Jane",
      "last_name": "Doe",
      "nickname": "jane",
      "roles": [
        "editor"
      ],
      "registered": "2025-03-14 09:21:07",
      "website_url": "https://example.com",
      "biography": "Managing editor.",
      "locale": "en_US"
    }
  }
}

 

Edge cases / errors

  • Malformed user_email → mosmcp_invalid_email error ("That is not a valid email address.").
  • Address already used by another account → refused by WordPress (existing_user_email error).
  • No user with that id → mosmcp_user_not_found; no edit rights over that user → mosmcp_cannot_edit.

 


<< Previous Next >>
Update User's Display Name Update User's First Name

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.