Macros for Portion
macros_for_portionRetrieve calorie, protein, fat, and carbohydrate values for a specified portion size of a USDA FoodData Central food item.
Instructions
Return calories, protein, fat, and carbohydrates for a specific USDA-defined portion of a FoodData Central entry.
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": {
"fdcId": "<fdcId>"
},
"name": "macros_for_portion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fdcId | Yes | ||
| portionId | No | ||
| portionIndex | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | ||
| nutrients | Yes |