Get nutrients of a food
get_nutrientsRetrieve a TACO food's nutrient composition by ID, scaled to a gram amount or per 100 g, with missing and trace values reported explicitly instead of as zero.
Instructions
Full composition of one TACO food by id (from search_food), per 100 g or scaled to a quantity in grams. Missing data is reported as null (not analyzed) or {"trace":true}, never as 0.
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>"
},
"name": "get_nutrients"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grams | No | Quantity in grams of edible portion. Omit for the table basis of 100 g. | |
| food_id | Yes | TACO food number, as returned by search_food. | |
| nutrients | No | Nutrient keys to return (e.g. "energy_kcal", "protein_g", "iron_mg"). Omit for all. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| food | Yes | ||
| notes | Yes | Caveats about this food or this answer. | |
| scaled | Yes | True when amounts were computed from the per-100 g table values for another quantity. | |
| source | Yes | Citation for the data. | |
| nutrients | Yes | Requested nutrients, in table order. | |
| basis_grams | Yes | Quantity the amounts refer to, in grams of edible portion. | |
| trace_nutrients | Yes | Keys reported as trace (Tr). | |
| not_analyzed_nutrients | Yes | Keys with no value in the TACO table; not zero. |