Skip to main content
Glama

wp_create_user

Add new users to a WordPress site by specifying username, email, password, and optional roles for access management.

Instructions

Creates a new user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoThe ID of the WordPress site to target (from mcp-wordpress.config.json). Required if multiple sites are configured.
usernameYesThe username for the new user.
emailYesThe email address for the new user.
passwordYesThe password for the new user.
rolesNoAn array of roles to assign to the user.

Implementation Reference

  • The core handler function for the 'wp_create_user' tool. It extracts parameters, calls WordPressClient.createUser(), handles the response with a success message, and propagates errors.
    public async handleCreateUser(client: WordPressClient, params: Record<string, unknown>): Promise<unknown> {
      const createParams = params as unknown as CreateUserRequest;
      try {
        const user = await client.createUser(createParams);
        return `✅ User "${user.name}" created successfully with ID: ${user.id}.`;
      } catch (_error) {
        throw new Error(`Failed to create user: ${getErrorMessage(_error)}`);
      }
    }
  • The tool registration within UserTools.getTools(). Defines the tool name, description, input schema (parameters), and binds the handler function for MCP tool system integration.
    {
      name: "wp_create_user",
      description: "Creates a new user.",
      parameters: [
        {
          name: "username",
          type: "string",
          required: true,
          description: "The username for the new user.",
        },
        {
          name: "email",
          type: "string",
          required: true,
          description: "The email address for the new user.",
        },
        {
          name: "password",
          type: "string",
          required: true,
          description: "The password for the new user.",
        },
        {
          name: "roles",
          type: "array",
          items: { type: "string" },
          description: "An array of roles to assign to the user.",
        },
      ],
      handler: this.handleCreateUser.bind(this),
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Creates a new user' indicates a write/mutation operation but reveals nothing about permissions required, whether the operation is idempotent, what happens on duplicate usernames/emails, or what the response contains. For a user creation tool with significant security implications, this minimal description leaves critical behavioral aspects unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is maximally concise at three words, with zero wasted language. It's front-loaded with the essential action and resource. Every word earns its place, making it immediately scannable and understandable without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a user creation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address authentication requirements, error conditions, return values, or security implications. The description should provide more context about what 'creating a user' entails in this WordPress context, especially since there's no structured output documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with each parameter well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Creates') and resource ('new user'), making the purpose immediately understandable. It distinguishes itself from sibling tools like wp_update_user or wp_delete_user by specifying creation rather than modification or deletion. However, it doesn't explicitly differentiate from wp_create_application_password which also creates a user-related resource, so it doesn't reach the highest level of sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (like authentication requirements), when not to use it, or how it relates to similar tools like wp_update_user or wp_get_user. The agent must infer usage context entirely from the tool name and input schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/docdyhr/mcp-wordpress'

If you have feedback or need assistance with the MCP directory API, please join our Discord server