Skip to main content
Glama

wp_clone_post

Copies a WordPress post from one environment to another as a new post, transferring all metadata. ID references are kept raw for manual remapping; supports field overrides.

Instructions

COPY a source post to another environment as a NEW post — the destination assigns its own ID (returned as new_id). Use this (NOT wp_sync_post) when the post does not exist on the destination yet, e.g. pushing a locally-authored alert/notification up to a Pantheon multidev. It reads the source post's fields (title, content, excerpt, status, type, dates, parent, etc.) plus ALL meta, creates the post on the destination via wp_insert_post, writes the meta verbatim, then verifies (content md5 + meta digest). Meta values that look like ID references (e.g. _thumbnail_id, ACF relationship/image fields) are copied RAW and REPORTED in id_reference_keys for manual remapping — the tool never silently remaps IDs across databases. Pass overrides to set post fields on the new post (e.g. {"post_status":"draft"}). Content/meta never pass through the caller's text. Creating on a production destination requires confirm=true when the PROD_GUARD is enabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesDestination environment to create the new post IN. Must differ from 'from'.
fromYesSource environment to read the post FROM.
siteNoWhich configured site to target. Omit for DEFAULT_SITE or the sole site.
to_envNoTerminus environment override for the DESTINATION when to='production'. Omit for TERMINUS_ENV.
confirmNoRequired to create on a production destination when the guard is enabled. Default: false.
post_idYesThe SOURCE post ID to clone. The destination will get a NEW, different ID.
from_envNoTerminus environment override for the SOURCE when from='production'. Omit for TERMINUS_ENV.
overridesNoOptional post fields to set/replace on the new post (e.g. {"post_status":"draft","post_title":"..."}).
Behavior5/5

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

In the absence of annotations, the description fully details the tool's behavior: it reads post fields and all meta, creates a new post via wp_insert_post, writes meta verbatim, verifies with content md5 and meta digest, reports ID references for manual remapping, and notes that content/meta never pass through the caller's text. It also mentions the production guard requiring confirm. No contradictions with annotations (none provided).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph of about 200 words. It is front-loaded with the key action and differentiated use case, but could benefit from bullet points or clearer separation of behavioral details. Still, every sentence provides necessary information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (8 parameters, nested overrides object, no output schema), the description is remarkably complete. It covers the full process, edge cases (ID references, verification, production guard), and explicitly mentions the returned new_id. The only minor gap is the lack of explicit output schema, but the description mentions the returned key new_id.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 8 parameters are described in the input schema (100% coverage), so baseline is 3. The description adds useful context: explains the new_id is assigned by destination, provides an overrides example, clarifies confirm requirement for production, and mentions Terminus environment overrides. This adds value beyond the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'COPY a source post to another environment as a NEW post' using a specific verb and resource. It distinguishes itself from the sibling tool wp_sync_post by specifying when to use it (post does not exist on destination) and provides a concrete example (pushing a locally-authored alert/notification up to a Pantheon multidev).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly contrasts with wp_sync_post: 'Use this (NOT wp_sync_post) when the post does not exist on the destination yet'. It also provides contextual guidance like pushing to a Pantheon multidev and requiring confirm=true on production with PROD_GUARD enabled.

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/EarthmanWeb/mcp-wp-cli-terminus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server