Update a stock quantity
set_inventory_quantityUse this when someone asks to correct or update how much of a stock item their vet clinic has. 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; work out the total first when the user gives a change. | |
| inventoryItemId | Yes | Id of the stock item, from list_inventory_items. | |
| expectedLastEditTime | Yes | The lastEditTime from list_inventory_items. An item changed since then is refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| status | Yes | ||
| previousQuantity | Yes |