Update User's Display Name


Updates a user's public display name, given their user ID and the new display_name.

Property Value
Ability slug mosmcp/update-user-profile
Wire tool name mosmcp__update-user-profile
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).
display_name string Yes — The new public display name (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
Change user #42's public display name to 'Jane D.'.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 200,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__update-user-profile",
    "arguments": {
      "input": {
        "id": 42,
        "display_name": "Jane D."
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 200,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 42,
      "username": "janedoe",
      "email": "jane@example.com",
      "display_name": "Jane D.",
      "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

  • No user with that id → mosmcp_user_not_found error.
  • Caller lacks edit rights over this specific user (e.g. a non-super-admin editing a super admin) → mosmcp_cannot_edit.
  • display_name is sanitized as plain text; HTML tags are stripped.

 


<< Previous Next >>
Update User's Biography Update User's Email Address

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.