Duplicate Page
Copies an existing page as a new draft, including its Elementor layout, assigned page template, theme display settings, custom fields and SEO fields. Use this to create a page that matches the design of an existing one, then edit the copy. The duplicate is authored by the current user and is created as a draft unless another status is given.
| Property | Value |
|---|---|
| Ability slug | mosmcp/page-duplicate |
| Wire tool name | mosmcp__page-duplicate |
| Category | Pages (mosmcp-pages) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_post (checked against the specific post) |
| Minimum default role | Editor |
| Annotations | readOnly: false · destructive: false · idempotent: false · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| source_id | integer (min 1) | Yes | — | The ID of the page to duplicate. Its layout and settings become the new page's. |
| title | string | — | Title for the duplicate. Omit to use the original title followed by "(copy)". | |
| status | string (one of draft, pending, private, publish) |
draft |
Status for the duplicate. Defaults to draft so the result can be reviewed before publishing. Publishing requires the publish capability. | |
| include_content | boolean | true |
Whether to copy the page body. Set false to keep the layout and settings but start with empty content. Defaults to true. | |
| expected_modified | string | — | Optional. The "modified" timestamp from a previous read of the source page. The duplicate is refused if the source changed since then. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| new_id | integer | Yes | ID of the newly created duplicate. |
| source_id | integer | Yes | |
| title | string | Yes | |
| status | string | Yes | |
| edit_url | string | ||
| view_url | string | ||
| copied | object | ||
| copied.meta_rows | integer | Number of metadata rows copied. | |
| copied.taxonomies | string[] | Taxonomies whose terms were copied. | |
| copied.thumbnail_id | integer | Featured image attachment ID on the duplicate, or 0. | |
| copied.has_elementor | boolean | Whether the duplicate carries an Elementor layout. | |
| copied.elementor_bytes | integer | ||
| skipped | object[] | Metadata deliberately not copied, with the reason for each. | |
| skipped[].key | string | ||
| skipped[].reason | string | ||
| rewritten | object[] | Metadata cleared rather than copied because the value is unique to the original. | |
| rewritten[].key | string | ||
| rewritten[].reason | string | ||
| warnings | object[] | Non-fatal issues encountered while duplicating. | |
| warnings[].code | string | ||
| warnings[].message | string | ||
| warnings[].context | string |
Example
Sample prompt
Make a copy of the Services page so I can build a new landing page with the same design.
Example request (json)
{
"jsonrpc": "2.0",
"id": 34,
"method": "tools/call",
"params": {
"name": "mosmcp__page-duplicate",
"arguments": {
"input": {
"source_id": 42,
"title": "Consulting Services"
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 34,
"result": {
"isError": false,
"structuredContent": {
"new_id": 58,
"source_id": 42,
"title": "Consulting Services",
"status": "draft",
"edit_url": "https://example.com/wp-admin/post.php?post=58&action=edit",
"view_url": "https://example.com/?page_id=58",
"copied": {
"meta_rows": 14,
"taxonomies": [],
"thumbnail_id": 31,
"has_elementor": true,
"elementor_bytes": 18422
},
"skipped": [
{
"key": "_edit_lock",
"reason": "Editor session state for the original post."
}
],
"rewritten": [
{
"key": "_yoast_wpseo_canonical",
"reason": "Cleared: an inherited canonical URL tells search engines the original is the real page, which would keep the duplicate out of search results."
}
],
"warnings": []
}
}
}
Edge cases / errors
- status of publish or private without the publish-pages capability → refused with cannot_publish; the caller is told to create it as a draft. Missing create-pages rights → cannot_create.
- expected_modified given and the source has changed since then → refused with source_changed; an unparseable date → invalid_expected_modified.
- source_id is not a page, or is an unsaved auto-draft → refused with source_not_found / source_not_saved.
- The copied Elementor layout fails to parse while the original was fine → the duplicate is force-deleted and the call fails with elementor_copy_corrupted. Edit locks, view counters, old-slug history and Elementor caches are skipped; canonical URLs and SKUs are cleared and listed in rewritten.
| << Previous | Next >> |
|---|---|
| Delete Page Permanently | Find Page (ID by Name / Name by ID) |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.