Skip to main content
Glama

mcp_create_cpt_post

Creates a WordPress post of any post type with title, status, content, and meta fields, sanitizing meta keys for reliable custom post management.

Instructions

Create a post of any post type. Meta keys are run through sanitize_key (lowercase a-z0-9_-).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "type": "<type>",
      "title": "<title>"
    },
    "name": "mcp_create_cpt_post"
  }
}

Input Schema

NameRequiredDescriptionDefault
metaNoPost meta key-value pairs, written with update_post_meta
siteYesSite id (see list_sites)
typeYesPost type name (e.g. post, page, product, testimonial)
titleYesPost title
statusNoPost status (default draft)
contentNoPost content (default empty). Note: the endpoint sanitizes it as plain text, so HTML tags are stripped

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv3.14.0
    • removedInput schema / properties / content / default
      Removed value: -""
    • changedInput schema / properties / content / description
      Previous value: -"Post content"New value: +"Post content (default empty). Note: the endpoint sanitizes it as plain text, so HTML tags are stripped"
    • removedInput schema / properties / meta / default
      Removed value: -{}
    • changedInput schema / properties / meta / description
      Previous value: -"Post meta key-value pairs"New value: +"Post meta key-value pairs, written with update_post_meta"
    • removedInput schema / properties / status / default
      Removed value: -"draft"
    • changedInput schema / properties / status / description
      Previous value: -"Post status"New value: +"Post status (default draft)"
    • addedInput schema / properties / status / enum
      Added value: +[
      +  "publish",
      +  "future",
      +  "draft",
      +  "pending",
      +  "private"
      +]
    • changedInput schema / properties / type / description
      Previous value: -"Post type name"New value: +"Post type name (e.g. post, page, product, testimonial)"
    • addedInput schema / properties / type / pattern
      Added value: +"^[a-zA-Z0-9_-]+$"
  2. Changed2 schema fields changedv3.4.0
    • addedInput schema / properties / site
      Added value: +{
      +  "description": "Site id (see list_sites)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "type",
      -  "title"
      -]New value: +[
      +  "site",
      +  "type",
      +  "title"
      +]
  3. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose one non-obvious trait: meta keys are normalized through sanitize_key (lowercase a-z0-9_-). It omits other important behavior for a write operation, such as required capabilities, what is returned (e.g., the new post id), and failure conditions.

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?

Two short sentences with zero filler, and the core action is front-loaded ahead of the sanitization caveat. Every sentence carries information the agent cannot get elsewhere.

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 six-parameter mutation tool with a nested meta object, no annotations, and no output schema, the description is quite thin. It never states what a successful call returns (post id, permalink) or what happens to unspecified fields, leaving an agent to guess about outcomes from a write operation.

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?

Schema description coverage is 100%, so the baseline is 3 regardless. The sanitize_key note adds genuine constraint meaning for the meta parameter that the schema does not state, but no other parameter semantics are elaborated beyond what the schema already documents.

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 uses a specific verb and resource: 'Create a post of any post type,' which clearly communicates the operation and its generic scope across post types. It stops short of differentiating itself from siblings such as wp_create_post or mcp_update_cpt_post, so an agent must infer the boundary from the tool name alone.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no sibling alternative is named. The only usage signal is the implied 'use this to create posts,' which is not enough to route between this tool and the closely named wp_create_post or mcp_update_cpt_post.

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

Deploy Server

Other Tools