Remove Terms From Custom Content
Removes specific terms from an item in one of its taxonomies, leaving the terms themselves intact for other items.
| Property | Value |
|---|---|
| Ability slug | mosmcp/cpt-remove-terms |
| Wire tool name | mosmcp__cpt-remove-terms |
| Category | Custom Content (mosmcp-cpt) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_post (checked against the specific post) |
| Minimum default role | Contributor |
| Annotations | readOnly: false · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| post_type | string (min length 1) | Yes | — | Which custom content type to work with, as reported by the list-types ability — for example "service" or "team_member". |
| id | integer (min 1) | Yes | — | The ID of the item. |
| taxonomy | string (min length 1) | Yes | — | Taxonomy to remove from. |
| terms | string[] | Yes | — | Terms to remove, by slug, name or ID. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | |
| post_type | string | ||
| taxonomy | string | Yes | |
| action | string | ||
| created_terms | string[] | Terms created because they did not exist. | |
| terms | object[] | Yes | The item's terms in this taxonomy after the change. |
| terms[].term_id | integer | ||
| terms[].name | string | ||
| terms[].slug | string | ||
| changed | boolean | ||
| warnings | object[] | Non-fatal issues encountered while running. | |
| warnings[].code | string | ||
| warnings[].message | string | ||
| warnings[].context | string |
Example
Sample prompt
Take the Brand Audit service out of the Consulting category.
Example request (json)
{
"jsonrpc": "2.0",
"id": 143,
"method": "tools/call",
"params": {
"name": "mosmcp__cpt-remove-terms",
"arguments": {
"input": {
"post_type": "service",
"id": 57,
"taxonomy": "service_category",
"terms": [
"consulting"
]
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 143,
"result": {
"isError": false,
"structuredContent": {
"id": 57,
"post_type": "service",
"taxonomy": "service_category",
"action": "remove",
"created_terms": [],
"terms": [
{
"term_id": 9,
"name": "Marketing",
"slug": "marketing"
}
],
"changed": true,
"warnings": []
}
}
}
Edge cases / errors
- A term name/slug/ID that doesn't exist in the taxonomy → terms_not_found; nothing is removed.
- taxonomy not attached to this type → taxonomy_not_on_type; no assign capability → cannot_assign_terms.
- The terms themselves are not deleted, only detached from this item; changed is false if the item didn't have them.
| << Previous | Next >> |
|---|---|
| Permanently Delete Custom Content Item | Restore Custom Content Item |
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.