Skip to main content
Glama

wp_create_page

Create new WordPress pages by specifying title, content, and publishing status. Use this tool to add content to your WordPress site through the MCP WordPress Server.

Instructions

Creates a new page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoThe ID of the WordPress site to target (from mcp-wordpress.config.json). Required if multiple sites are configured.
titleYesThe title for the page.
contentNoThe content for the page, in HTML format.
statusNoThe publishing status for the page.

Implementation Reference

  • Registration of the wp_create_page tool in PageTools.getTools() method, including name, description, input parameters schema, and reference to the handler function.
    {
      name: "wp_create_page",
      description: "Creates a new page.",
      parameters: [
        {
          name: "title",
          type: "string",
          required: true,
          description: "The title for the page.",
        },
        {
          name: "content",
          type: "string",
          description: "The content for the page, in HTML format.",
        },
        {
          name: "status",
          type: "string",
          description: "The publishing status for the page.",
          enum: ["publish", "draft", "pending", "private"],
        },
      ],
      handler: this.handleCreatePage.bind(this),
    },
  • The handler function that implements the core logic of wp_create_page: casts params to CreatePageRequest, calls WordPressClient.createPage(), and returns formatted success message or throws error.
    public async handleCreatePage(client: WordPressClient, params: Record<string, unknown>): Promise<unknown> {
      const createParams = params as unknown as CreatePageRequest;
      try {
        const page = await client.createPage(createParams);
        return `✅ Page created successfully!\n- ID: ${page.id}\n- Title: ${page.title.rendered}\n- Link: ${page.link}`;
      } catch (_error) {
        throw new Error(`Failed to create page: ${getErrorMessage(_error)}`);
      }
    }
  • TypeScript interface defining the CreatePageRequest structure used for typing the parameters in the wp_create_page handler.
    export interface CreatePageRequest {
      title?: string;
      content?: string;
      author?: number;
      excerpt?: string;
      featured_media?: number;
      comment_status?: CommentStatus;
      ping_status?: PingStatus;
      menu_order?: number;
      meta?: WordPressMeta;
      parent?: number;
      template?: string;
      date?: string;
      date_gmt?: string;
      slug?: string;
      status?: PostStatus;
      password?: string;
    }
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 page' implies a write/mutation operation, but the description doesn't disclose what permissions are required, whether the creation is immediate or scheduled, what happens on failure, or what the response contains. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 - a single three-word sentence that communicates the core function without any wasted words. It's front-loaded with the essential information and earns its place efficiently.

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?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after creation (e.g., returns a page ID, redirects, or provides confirmation), what error conditions might occur, or any side effects. The combination of mutation operation + missing annotations + no output schema requires more descriptive context than provided.

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 schema description coverage is 100%, so all parameters are documented in the input schema. The description adds no additional parameter information beyond what's already in the schema descriptions. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 action ('creates') and resource ('new page'), making the purpose immediately understandable. It distinguishes itself from siblings like wp_create_post (which creates posts) and wp_update_page (which updates existing pages). However, it doesn't specify that this is for WordPress specifically, though the tool name provides that context.

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. It doesn't mention when to choose wp_create_page over wp_create_post (for different content types), or when to use wp_update_page instead (for modifying existing pages). There's also no mention of prerequisites like authentication or site configuration.

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