update_stock
Set a product's stock quantity by product ID. Use it to correct or sync inventory levels in WooCommerce, after confirming the change with the user.
Instructions
Set the stock quantity of a product. Requires WC_ALLOW_WRITE=true. Confirm with the user first.
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": {
"product_id": "<product_id>",
"quantity": "<quantity>"
},
"name": "update_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quantity | Yes | ||
| product_id | Yes |