get_stock_by_warehouse
Retrieve stock distribution across warehouses or stores for a specific product or all products. Filter by SKU, product ID, or warehouse to check inventory levels.
Instructions
取得商品在各倉庫/門市的庫存分佈矩陣。可查詢單一商品或全部商品的各倉庫庫存。
查特定貨品時請帶 sku 或 product_id;不帶條件的全掃描因為每個商品都要一次 API 呼叫,會受 max_products 限制(回傳的 scan_truncated 會標示是否被截斷)。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_stock_by_warehouse"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | 以 SKU 精準定位商品後再查倉庫庫存(建議,快且不會漏) | |
| product_id | No | 商品 ID(不填則查詢全部商品,但較慢) | |
| max_products | No | 未指定商品時最多掃描幾個商品(每個商品需一次 API 呼叫,故較慢) | |
| warehouse_id | No | 倉庫 ID 篩選(僅看特定倉庫) |