Update product

Change a product name, status, price, sale price or stock.

MCP tool woocommerce_write → update_product

write Confirm

Updates one product. Change the regular price or the sale price, switch the status between draft, pending, private and publish, or set the stock quantity with manage_stock. Prices are strings in the store currency, and an empty sale_price ends the sale. A published product changes on your storefront at once, so the call is treated as reaching your customers. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: update_product
NameTypeDescription
product_id integer required integer Product ID from list_products.
name string string New product name.
status enum enum draft, pending, private or publish.
regular_price string string Regular price, for example "14.00".
sale_price string string Sale price; an empty string ends the sale.
manage_stock boolean boolean true tracks the stock quantity.
stock_quantity integer integer Units in stock. Needs manage_stock.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "woocommerce_write",
    "arguments": {
      "operation": "update_product",
      "arguments": {
        "product_id": 311,
        "sale_price": "11.20"
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "product_id": 311,
    "name": "Linen tote bag",
    "status": "publish",
    "regular_price": "14.00",
    "sale_price": "11.20",
    "on_sale": true,
    "manage_stock": true,
    "stock_quantity": 40
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.