Create Product Category
woocommerce_create_product_categoryCreate a new product category by providing a name. Optionally add a description, parent category, and choose response format. Returns the created category with its ID.
Instructions
Create a new product category.
Args:
name (string, required)
description (string, optional)
parent (number, optional): parent category ID
response_format ('markdown'|'json'): default 'markdown'
Returns: The newly created category object with its assigned ID.
Error Handling:
Returns "Error: Bad request (400)" if a category with this name/slug already exists.
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": {
"name": "<name>"
},
"name": "woocommerce_create_product_category"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Category name | |
| parent | No | Parent category ID, for nested categories | |
| description | No | ||
| response_format | No | Output format: 'markdown' for human-readable text or 'json' for machine-readable structured data | markdown |