wp_create_post
Creates a new post or page. For a user-requested author task, resolve the account with wp_find_users; never guess IDs or choose an ambiguous match. Read back successful author assignment with wp_read_post. Returns the new post ID and permalink. Use wp_duplicate_post when the user asks to duplicate or clone an existing page so Elementor/post metadata is copied.
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_id": "<site_id>",
"title": "<title>",
"content": "<content>"
},
"name": "wp_create_post"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Optional permalink slug. WordPress sanitizes it and applies status-specific uniqueness. Empty allows an empty draft/pending slug; published posts derive one from the title. The persisted slug is returned in after.slug. | |
| tags | No | Existing tag term IDs. Supplied arrays replace assignments; empty clears tags. Omit on update to preserve. Never creates terms. Read IDs with wp_read_post. | |
| title | Yes | The post title. | |
| author | No | Native WordPress account ID. Omit to use the current user. Requires author support; assigning another account requires edit_others_posts for this post type. | |
| status | No | Initial post status. | draft |
| content | Yes | The post content as HTML or Gutenberg block markup. | |
| site_id | Yes | The connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID. | |
| template | No | Pages only: an available native page-template slug/file, or default to reset. Omit on update to preserve. Read the actual assignment in wp_read_post.template. | |
| post_type | No | Post type slug. | post |
| categories | No | Existing category term IDs. Supplied arrays replace assignments; omit on update to preserve. Empty uses the WordPress default category for posts (and filtered default-category post types), except auto-drafts; otherwise clears. Never creates terms. Read IDs with wp_read_post. |