Check Username Availability


Checks whether a username is already taken, given the candidate username. Use this before mosmcp/create-user to avoid a login-exists error. Read-only.

Property Value
Ability slug mosmcp/check-username-availability
Wire tool name mosmcp__check-username-availability
Category Users & Roles (mosmcp-users)
Plan Free

 

Required access

Requirement Value
Capability list_users
Minimum default role Administrator (Shop manager too when WooCommerce is active)
Annotations readOnly: true · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
username string Yes — The username to check (required).

 

Output schema

Field Type Required
username string Yes
available boolean Yes

 

Example

Sample prompt
Is the username 'janedoe' still available?

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 172,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__check-username-availability",
    "arguments": {
      "input": {
        "username": "janedoe"
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 172,
  "result": {
    "isError": false,
    "structuredContent": {
      "username": "janedoe",
      "available": false
    }
  }
}

 

Edge cases / errors

  • The username is cleaned with strict sanitize_user first; the returned username is the cleaned form that was checked.
  • A username that sanitizes to empty → available false.
  • Only checks uniqueness; mosmcp/create-user can still refuse a name that fails WordPress username validation.

 


<< Previous Next >>
Check Email Availability Count Users

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.