royal-mcp__wp_add_post_terms
Add terms to a post in any taxonomy, or replace the terms it has. By default the terms are added and the existing ones stay; pass replace: true to make the post have exactly the terms you send (an empty list then removes them all). Accepts term IDs (integers), slugs (for hierarchical taxonomies like category), or names (for non-hierarchical like post_tag). The reply lists the terms before and after, which were added, removed and newly created. dry_run true previews the result (terms before, after, added, removed and created) and changes nothing. A write that changes the terms returns an undo token: undo puts back the earlier terms exactly and deletes terms the call created when nothing else uses them; it is refused with edited_since_write when the post's terms in that taxonomy changed since, unless forced. (site: demo.royalplugins.com) Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then.
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": {
"post_id": "<post_id>",
"terms": "<terms>",
"taxonomy": "<taxonomy>"
},
"name": "royal-mcp__wp_add_post_terms"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| terms | Yes | Array of term IDs (integers) OR term slugs/names (strings). Must be an array — pass ["my-tag"] not "my-tag". | |
| dry_run | No | true previews (default false). | |
| post_id | Yes | ||
| replace | No | false (default): add these terms and keep the existing ones. true: the post ends up with exactly these terms. | |
| site_id | No | Site to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com) | |
| taxonomy | Yes | Taxonomy slug (e.g. category, post_tag, product_cat) |