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.
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 |