Delete Category
Deletes a post category. The posts in it are NOT deleted — they move to the default category. The default category itself cannot be deleted. Requires confirm=true.
| Property | Value |
|---|---|
| Ability slug | mosmcp/category-delete |
| Wire tool name | mosmcp__category-delete |
| Category | Categories (mosmcp-categories) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | manage_categories |
| Minimum default role | Editor |
| Annotations | readOnly: false · destructive: true · idempotent: true · openWorld: true |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer (min 1) | Yes | — | The ID of the category to delete. |
| confirm | boolean | Yes | — | Must be true to confirm the deletion. |
Output schema
| Field | Type | Required |
|---|---|---|
| id | integer | Yes |
| name | string | Yes |
| deleted | boolean | Yes |
| posts_moved_to | string |
Example
Sample prompt
Delete the 'Old News' category.
Example request (json)
{
"jsonrpc": "2.0",
"id": 58,
"method": "tools/call",
"params": {
"name": "mosmcp__category-delete",
"arguments": {
"input": {
"id": 23,
"confirm": true
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 58,
"result": {
"isError": false,
"structuredContent": {
"id": 23,
"name": "Old News",
"deleted": true,
"posts_moved_to": "Uncategorized"
}
}
}
Edge cases / errors
- confirm is not exactly true → refused with confirmation_required.
- The category is the site's default category → refused with cannot_delete_default.
- id does not exist → category_not_found; posts in the deleted category are not deleted but fall back to the default category (named in posts_moved_to).
- WordPress fails to delete it → delete_failed.
| << Previous | Next >> |
|---|---|
| Create Category | Find Category (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.