Stock levels
stock_levelHow many units of one product are on hand now, found by product name, SKU or exact barcode (an ambiguous query returns candidates). onHand is the company total. A service item ("Service — no stock") returns isService:true and onHand:null: it holds no stock. A placeholder Taokeh made to carry document lines (a marketplace item such as SHOPEE-ITEM, TIKTOK-ITEM or SHOPIFY-ITEM, a POS summary item, an item added during migration, a scanned line) returns isPlaceholder:true and onHand:null: any figure it holds is not stock. On a company with more than one stock location, product.locations lists each ({location, isDefault, onHand}; a location without the item reads 0); single-location books omit the list. Locations need not add up to onHand. Less than onHand: the difference is on record at no location (stock booked before locations were set up). More than onHand: a sale took more than its location held, so the extra came off the total but no shelf. onHand is the figure the books value. On a company using Counter (the till), the figure is as at the last day-close, because counter sales move stock when the day is closed, not at each scan.
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": {
"query": "<query>"
},
"name": "stock_level"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |