Update Product
Updates an existing product's name, description, pricing, stock, shipping, taxonomy, or status. Provide the product ID and at least one field to change.
Also known as: change price, edit product, update stock, put on sale.
| Property | Value |
|---|---|
| Ability slug | mosmcp/update-product |
| Wire tool name | mosmcp__update-product |
| Category | WooCommerce (mosmcp-woocommerce) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_products |
| Minimum default role | Shop manager |
| Requires | WooCommerce |
| Annotations | readOnly: false · destructive: true · idempotent: true · openWorld: true |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer | Yes | — | The product ID to update (required). |
| name | string | — | New product name. | |
| status | string (one of draft, pending, private, publish) |
— | New product status. | |
| 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
Put product 42 on sale for $19.99 until the end of October.
Example request (json)
{
"jsonrpc": "2.0",
"id": 391,
"method": "tools/call",
"params": {
"name": "mosmcp__update-product",
"arguments": {
"input": {
"id": 42,
"sale_price": "19.99",
"date_on_sale_to": "2026-10-31"
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 391,
"result": {
"isError": false,
"structuredContent": {
"success": true,
"message": "Product updated.",
"data": {
"id": 42,
"name": "Organic Cotton T-Shirt",
"slug": "organic-cotton-t-shirt",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Soft, breathable organic cotton tee.</p>",
"short_description": "Everyday organic tee.",
"sku": "TSHIRT-ORG-01",
"price": "19.99",
"regular_price": "24.00",
"sale_price": "19.99",
"price_html": "<del>$24.00</del> <ins>$19.99</ins>",
"on_sale": true,
"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": [
{
"id": 31,
"name": "Organic",
"slug": "organic"
}
],
"images": [
{
"id": 88,
"src": "https://example.com/wp-content/uploads/2026/09/tshirt.jpg",
"alt": "Organic cotton t-shirt"
}
],
"date_created": "2026-08-12T09:30:00",
"date_modified": "2026-09-20T14:02:11",
"permalink": "https://example.com/product/organic-cotton-t-shirt/"
},
"meta": {
"ability": "mosmcp/update-product",
"timestamp": "2026-09-29T10:15:00+00:00",
"execution_time": "18.4ms"
}
}
}
}
Edge cases / errors
- Only id supplied → wcab_nothing_to_update ("Provide at least one field to update").
- Unknown product → wcab_product_not_found; no permission to edit that specific product → wcab_cannot_edit.
- Setting status to publish without publish_products → wcab_cannot_publish.
- category_ids, tag_ids and image_ids replace the whole existing set (empty array clears them); sale_price "" clears the sale.
| << Previous | Next >> |
|---|---|
| Update Order Status |
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.