Update a stock quantity
set_inventory_quantityUse this when someone asks to correct or update how much of an item a business has in stock, such as after a count or a delivery. Returns the item with its previous and new quantity; the number given replaces the stored one. Not for adding a new stock item.
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": {
"inventoryItemId": "<inventoryItemId>",
"quantity": "<quantity>",
"expectedLastEditTime": "<expectedLastEditTime>"
},
"name": "set_inventory_quantity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quantity | Yes | The quantity now in stock, in the item unit. It replaces the stored quantity rather than adding to it. | |
| inventoryItemId | Yes | Stock item id: 24 lowercase hexadecimal characters. | |
| expectedLastEditTime | Yes | The item's lastEditTime as last read; an item changed since then is refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| status | Yes | ||
| previousQuantity | Yes |