set_woocommerce_stock
Set or adjust WooCommerce stock destructive
Description
Change stock on the brand's WooCommerce store. mode set (quantity becomes the count) or adjust (quantity is added; negative subtracts). changes: [{ productId, variationId or sku, quantity }], up to 100. Without confirm:true NOTHING changes and the reply shows the count now and after for each: show the user, get a yes, then call again with confirm:true and each change's expected set to its 'now' number, so a sale in between is refused instead of overwritten. An item whose stock is not tracked yet gets tracking turned on at the new count. Read back. Free.
Parameters
| Parameter | Type | Description |
|---|---|---|
mode | "set" | "adjust" | default set |
changesrequired | object[] | |
changes[].productId | string | |
changes[].variationId | string | |
changes[].sku | string | |
changes[].quantityrequired | number | |
changes[].expected | number | null | the "now" count the preview showed |
confirm | boolean |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/set_woocommerce_stock.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"set_woocommerce_stock","arguments":{"changes":"<array>"}}}
CLI
hermoso call set_woocommerce_stock --json '{"changes":"<array>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
get_woocommerce_stockGet WooCommerce stockrefund_woocommerce_orderRefund a WooCommerce orderupdate_woocommerce_orderUpdate a WooCommerce orderlist_woocommerce_ordersList WooCommerce orders