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
| Name | Required | Description | Default |
|---|---|---|---|
| meta | No | Post meta key-value pairs, written with update_post_meta | |
| site | Yes | Site id (see list_sites) | |
| type | Yes | Post type name (e.g. post, page, product, testimonial) | |
| title | Yes | Post title | |
| status | No | Post status (default draft) | |
| content | No | Post content (default empty). Note: the endpoint sanitizes it as plain text, so HTML tags are stripped |