Check item availability
check_item_availabilityCheck whether an item is currently available: status, who holds it, where it is, how many tickets are open on it, how many of its maintenance checks are overdue and how many active orders request it. Status defect or in_repair, an open ticket other than a maintenance check that is not yet due, overdueMaintenance > 0 or requestedInOrders > 0 each make assign_item answer requiresAcknowledgment when it sets a holder. For quantity-tracked items the result also carries totalQuantity and distribution: one row per stocked level, locations AND people holding stock, with { locationId, name, kind: location|person, quantity, available, reserved?, minStock?, isLow? }, the same row shape transfer_stock and adjust_stock return after a write. available = quantity minus what active orders reserved, floored at 0; isLow compares AVAILABLE against that level's threshold, so a full shelf with heavy reservations IS low. minStock and isLow appear together and only where a threshold exists: an absent isLow means no threshold is set there, not that the level is healthy. reserved is absent when 0; person rows carry neither (orders deliver to places, and person-held stock cannot carry a threshold). locationId is the id adjust_stock, set_min_stock and transfer_stock take. Units inside containers (a bag, a vehicle compartment) are not in distribution: they come under packed, one row per container and compartment { containerId, containerName, containerPath?, compartmentName?, quantity, effectiveLocationName?, effectiveHolderName? } (absent when none), and totalQuantity counts them. Packed units are moved in the app's stock section; transfer_stock and adjust_stock work on places and people only.
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>"
},
"name": "check_item_availability"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | Item id |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Item name | |
| itemId | No | Item id | |
| packed | No | Units inside containers (a bag, a vehicle compartment) — quantity-tracked items only, absent when none. Not in distribution; their place follows the container | |
| status | No | Condition (see search_items) | |
| available | No | Status available AND nobody currently holds it | |
| openTickets | No | Open tickets on this item | |
| distribution | No | Per-holder stock — quantity-tracked items only. One row per stocked level, locations AND people, each carrying its resource id so no search_resources lookup is needed. | |
| totalQuantity | No | Pool total — quantity-tracked items only. Counts places, people AND units inside containers | |
| currentHolderName | No | Who holds it now | |
| requestedInOrders | No | Active orders that requested this item but have not picked it | |
| overdueMaintenance | No | Overdue maintenance checks; with any, assign_item answers requiresAcknowledgment when it sets a holder | |
| currentLocationName | No | Where it is now |