Create Tag
Creates a new post tag. Optionally set a custom slug and a description. Fails with a clear error if a tag with the same name already exists.
| Property | Value |
|---|---|
| Ability slug | mosmcp/tag-create |
| Wire tool name | mosmcp__tag-create |
| Category | Tags (mosmcp-tags) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | manage_categories |
| Minimum default role | Editor |
| Annotations | readOnly: false · destructive: false · idempotent: false · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string (min length 1) | Yes | — | The name of the new tag. |
| slug | string (min length 1) | — | Optional custom URL slug. If omitted, WordPress generates one from the name. | |
| description | string | — | Optional description of the tag. |
Output schema
| Field | Type | Required |
|---|---|---|
| id | integer | Yes |
| name | string | Yes |
| slug | string | |
| description | string | |
| edit_url | string |
Example
Sample prompt
Create a tag called 'gluten-free'.
Example request (json)
{
"jsonrpc": "2.0",
"id": 68,
"method": "tools/call",
"params": {
"name": "mosmcp__tag-create",
"arguments": {
"input": {
"name": "Gluten Free"
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 68,
"result": {
"isError": false,
"structuredContent": {
"id": 44,
"name": "Gluten Free",
"slug": "gluten-free",
"description": "",
"edit_url": "https://example.com/wp-admin/term.php?taxonomy=post_tag&tag_ID=44"
}
}
}
Edge cases / errors
- A tag with the same name already exists → refused with tag_exists, naming the existing ID.
- name empty after sanitizing → refused with missing_name.
- A slug already used by another tag → WordPress's duplicate-term error.
| << Previous | Next >> |
|---|---|
| Update Category Slug | Delete Tag |
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.