Create Product
Creates a new simple or external WooCommerce product. Defaults to a draft simple product.
Also known as: add a product, new product, list an item for sale.
| Property | Value |
|---|---|
| Ability slug | mosmcp/create-product |
| Wire tool name | mosmcp__create-product |
| Category | WooCommerce (mosmcp-woocommerce) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | publish_products |
| Minimum default role | Shop manager |
| Requires | WooCommerce |
| Annotations | readOnly: false · destructive: false · idempotent: false · openWorld: true |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | Yes | — | The product name (required). |
| type | string (one of simple, external) |
simple |
Product type. Defaults to simple. Variable and grouped products are not yet supported by this ability. | |
| status | string (one of draft, pending, private, publish) |
draft |
Product status. Defaults to draft. | |
| slug | string | — | URL slug. | |
| regular_price | string | — | Regular price. | |
| sale_price | string | — | Sale price. Pass an empty string to clear it. | |
| date_on_sale_from | string \| null | — | Sale start date (YYYY-MM-DD). Pass null or an empty string to clear it. | |
| date_on_sale_to | string \| null | — | Sale end date (YYYY-MM-DD). Pass null or an empty string to clear it, e.g. to make an active sale indefinite. | |
| sku | string | — | Stock keeping unit. | |
| description | string | — | Full product description. Basic HTML is allowed. | |
| short_description | string | — | Short product description. Basic HTML is allowed. | |
| featured | boolean | — | Whether the product is featured. | |
| catalog_visibility | string (one of visible, catalog, search, hidden) |
— | Catalog visibility. | |
| virtual | boolean | — | Whether the product is virtual (no shipping required). | |
| downloadable | boolean | — | Whether the product is downloadable. | |
| manage_stock | boolean | — | Whether WooCommerce should track stock for this product. | |
| stock_quantity | integer | — | Stock quantity. Only used when manage_stock is true. | |
| stock_status | string (one of instock, outofstock, onbackorder) |
— | Stock status. | |
| backorders | string (one of no, notify, yes) |
— | Backorder handling. | |
| sold_individually | boolean | — | Limit purchases to one item per order. | |
| weight | string | — | Weight, in the store's configured weight unit. | |
| dimensions | object | — | Dimensions, in the store's configured dimension unit. | |
| dimensions.length | string | — | ||
| dimensions.width | string | — | ||
| dimensions.height | string | — | ||
| tax_status | string (one of taxable, shipping, none) |
— | Tax status. | |
| tax_class | string | — | Tax class slug. Empty string for the standard class. | |
| category_ids | integer[] | — | Product category term IDs to assign. Replaces the existing set entirely; pass an empty array to remove all categories. | |
| tag_ids | integer[] | — | Product tag term IDs to assign. Replaces the existing set entirely; pass an empty array to remove all tags. | |
| image_ids | integer[] | — | Media library attachment IDs. The first is used as the featured image, the rest as the gallery. Replaces the existing set entirely; pass an empty array to remove the featured image and gallery. | |
| upsell_ids | integer[] | — | Upsell product IDs. | |
| cross_sell_ids | integer[] | — | Cross-sell product IDs. | |
| purchase_note | string | — | Note shown to the customer after purchase. | |
| menu_order | integer | — | Custom sort order. | |
| external_url | string | — | Product URL. Applies to external products only. | |
| button_text | string | — | Buy button label. Applies to external products only. |
Output schema
| Field | Type | Required |
|---|---|---|
| success | boolean | |
| message | string | |
| data | object | |
| data.id | integer | |
| data.name | string | |
| data.slug | string | |
| data.type | string | |
| data.status | string | |
| data.featured | boolean | |
| data.catalog_visibility | string | |
| data.description | string | |
| data.short_description | string | |
| data.sku | string | |
| data.price | string | |
| data.regular_price | string | |
| data.sale_price | string | |
| data.price_html | string | |
| data.on_sale | boolean | |
| data.purchasable | boolean | |
| data.virtual | boolean | |
| data.downloadable | boolean | |
| data.manage_stock | boolean | |
| data.stock_quantity | integer \| null | |
| data.stock_status | string | |
| data.backorders | string | |
| data.weight | string | |
| data.dimensions | object | |
| data.tax_status | string | |
| data.tax_class | string | |
| data.shipping_class | string | |
| data.sold_individually | boolean | |
| data.upsell_ids | integer[] | |
| data.cross_sell_ids | integer[] | |
| data.purchase_note | string | |
| data.menu_order | integer | |
| data.categories | object[] | |
| data.tags | object[] | |
| data.images | object[] | |
| data.date_created | string \| null | |
| data.date_modified | string \| null | |
| data.permalink | string | |
| meta | object | |
| meta.ability | string | |
| meta.timestamp | string | |
| meta.execution_time | string \| null |
Example
Sample prompt
Add a new product called 'Organic Cotton T-Shirt' priced at $24 with 35 in stock, but keep it as a draft.
Example request (json)
{
"jsonrpc": "2.0",
"id": 357,
"method": "tools/call",
"params": {
"name": "mosmcp__create-product",
"arguments": {
"input": {
"name": "Organic Cotton T-Shirt",
"regular_price": "24.00",
"sku": "TSHIRT-ORG-01",
"manage_stock": true,
"stock_quantity": 35,
"category_ids": [
15
]
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 357,
"result": {
"isError": false,
"structuredContent": {
"success": true,
"message": "Product created.",
"data": {
"id": 42,
"name": "Organic Cotton T-Shirt",
"slug": "organic-cotton-t-shirt",
"type": "simple",
"status": "draft",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Soft, breathable organic cotton tee.</p>",
"short_description": "Everyday organic tee.",
"sku": "TSHIRT-ORG-01",
"price": "24.00",
"regular_price": "24.00",
"sale_price": "",
"price_html": "<span class=\"amount\">$24.00</span>",
"on_sale": false,
"purchasable": true,
"virtual": false,
"downloadable": false,
"manage_stock": true,
"stock_quantity": 35,
"stock_status": "instock",
"backorders": "no",
"weight": "0.2",
"dimensions": {
"length": "30",
"width": "25",
"height": "2"
},
"tax_status": "taxable",
"tax_class": "",
"shipping_class": "",
"sold_individually": false,
"upsell_ids": [],
"cross_sell_ids": [],
"purchase_note": "",
"menu_order": 0,
"categories": [
{
"id": 15,
"name": "Clothing",
"slug": "clothing"
}
],
"tags": [],
"images": [],
"date_created": "2026-08-12T09:30:00",
"date_modified": "2026-09-20T14:02:11",
"permalink": "https://example.com/?post_type=product&p=42"
},
"meta": {
"ability": "mosmcp/create-product",
"timestamp": "2026-09-29T10:15:00+00:00",
"execution_time": "18.4ms"
}
}
}
}
Edge cases / errors
- No status given → the product is saved as a draft; publish requires the publish_products capability (wcab_cannot_publish).
- type "external" without external_url → wcab_missing_external_url; variable and grouped products can't be created here.
- Negative or non-numeric regular_price/sale_price → wcab_invalid_price; negative stock_quantity → wcab_invalid_stock_quantity.
- Bad sale dates (not YYYY-MM-DD, or date_on_sale_from after date_on_sale_to) → wcab_invalid_date.
| << Previous | Next >> |
|---|---|
| Create Order Refund | Create Product Category |
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.