Set restock threshold
set_min_stockSet or clear the restock threshold (minimum stock) for a quantity-tracked item at ONE location: "alert us when Room 201 drops below 5". Thresholds are per item PER LOCATION, so locationId is required alongside itemId: every row of check_item_availability's distribution carries the locationId of a level that stocks the item, and search_resources (type: "location") returns the id of a location that does not stock it yet. minStock is a number, or null to clear the threshold. "Low" is measured against AVAILABLE stock, the shelf count MINUS what active orders reserved: 14 on hand with 10 reserved against a threshold of 5 IS low (4 available); check_item_availability reports that verdict per level as isLow. While the location is low a restock task is open for the order handlers; raising, lowering or clearing the threshold re-evaluates it immediately. Person-held stock cannot carry a threshold. Requires the manager role. Idempotent: the same value again changes nothing.
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": {
"itemId": "<itemId>",
"locationId": "<locationId>",
"minStock": "<minStock>"
},
"name": "set_min_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | Item id (must be a quantity-tracked item) | |
| minStock | Yes | The threshold, or null to clear it | |
| locationId | Yes | Location resource id, from check_item_availability's distribution or search_resources |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Item name | |
| itemId | No | Item id | |
| minStock | No | The threshold now in force (absent = cleared) | |
| quantity | No | Stock on hand at that location | |
| locationId | No | Location resource id | |
| locationName | No | Location name |