Open pack
open_packRecord that the user opened a pack (tub, loaf, jar) of a saved food, so what is left of it is counted from the portions logged since; correct what is left of the open pack; or stop counting. Returns the pack size, grams used and grams left.
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": {
"food": "<food>"
},
"name": "open_pack"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| food | Yes | A saved food's id or name | |
| stop | No | true to stop counting packs for this food | |
| left_g | No | Grams left in the pack now. With pack_g: a pack already partly used before counting began. Without pack_g: corrects the open pack (after weighing it), keeping its size, opening day and entries | |
| pack_g | No | Net weight of the pack in grams, from its label | |
| opened_on | No | The day it was opened. Default today |