Consume inventory item
consume_inventory_itemConsume part or all of an inventory item by entry_id or food_id, setting quantity to zero when depleted and returning a warning if more is requested than on hand.
Instructions
Use up some or all of an inventory entry. Identify it by entry_id, or by food_id with optional location_id (errors listing the candidates when several entries match). Give exactly one of amount (> 0) or all: true. Optional unit_id must match the entry unit; there is no unit conversion. The amount never goes below 0: consuming more than is on hand sets it to 0 and returns a warning. Never deletes the entry; at 0 (including after all: true) it is hidden from list_inventory_entries unless include_empty is true. Not atomic: two concurrent consumes of one entry can lose an update.
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": "consume_inventory_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Use up the whole entry instead of an amount. | |
| amount | No | Amount to use, in the entry unit. | |
| format | No | slim (default) returns a compact shape. full returns the raw Tandoor object. | |
| food_id | No | Food ID, from list_foods. Give this or entry_id. | |
| unit_id | No | Must equal the entry unit. No conversion. | |
| entry_id | No | Inventory entry ID, from list_inventory_entries. Give this or food_id. | |
| location_id | No | Narrows food_id to this location. Not with entry_id. |