Get By Nutrition
get_by_nutritionFind fruits matching a nutritional range. Specify nutrient type (calories, sugar, fat, carbs, protein) and min/max values to filter results.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"max": 60,
"min": 40,
"nutrient": "calories"
},
"name": "get_by_nutrition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | Yes | Maximum value for the nutrient (inclusive). | |
| min | Yes | Minimum value for the nutrient (inclusive). | |
| nutrient | Yes | The nutrient to filter by. One of: calories, sugar, fat, carbohydrates, protein. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | Yes | Maximum nutrient value for filtering | |
| min | Yes | Minimum nutrient value for filtering | |
| count | Yes | Number of fruits matching the criteria | |
| fruits | Yes | ||
| nutrient | Yes | The nutrient type used for filtering |