Scale a portion
calculate_portionScale one food to a gram weight and return calories and macros. Use after search_foods when the user gives an amount.
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_id": "<food_id>",
"grams": "<grams>"
},
"name": "calculate_portion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grams | Yes | Weight in grams | |
| food_id | Yes | food_id from search_foods |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |