Search USDA FoodData Central
search_foodsFind foods by name in USDA FoodData Central and get fdcId, description, dataType, and macro availability. Prioritizes entries with complete macro data for reliable nutrition analysis.
Instructions
Find foods by name in USDA FoodData Central. Returns fdcId, description, dataType, and hasCoreMacros. Prefer entries where hasCoreMacros is true: Foundation records are analytically detailed but frequently omit Energy, while SR Legacy records carry a complete macro panel. Cached on disk.
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": {
"query": "<query>"
},
"name": "search_foods"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Food name, e.g. 'chia seeds dried' | |
| page_size | No | ||
| data_types | No | Defaults to Foundation + SR Legacy. Add 'Branded' for commercial products. |