Create food
create_foodCreate a new food in Tandoor with optional plural name, description, pantry status, USDA ID, category, and shopping lists, while detecting existing foods to prevent duplicates.
Instructions
Create food. Required: name. Optional: plural_name, description, food_onhand, fdc_id, supermarket_category_id, shopping_list_ids (ids from list_shopping_lists). If a food with this name exists, Tandoor returns it instead of creating one. With shopping_list_ids (including []), the tool looks up the name first and, if a food with that name exists (ignoring case and surrounding spaces), refuses and changes nothing; use update_food. Tandoor also returns an existing food whose plural name matches; the tool detects that from the create reply and refuses the same way, setting no lists. With non-empty shopping_list_ids, the tool creates the food first and then sets its lists, because Tandoor cannot set lists while creating a food. With any shopping_list_ids (including []), if a step after the create fails, the error gives the new food's id and says not to retry. Changing a food's lists does not change its existing shopping entries. add_recipe_to_shopping_list copies the food's lists onto new entries. create_shopping_entry without shopping_list_ids copies them when the user preference shopping_update_food_lists is on. bulk_create_shopping_list_recipe_entries without shopping_list_ids copies each food's lists whatever the user preference. Every list id is checked against list_shopping_lists first; unknown or repeated ids are rejected and nothing is written. If the lists after the write differ from the request, the tool errors and names the missing and the extra lists.
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": {
"name": "<name>"
},
"name": "create_food"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Food name, e.g. tomato. | |
| fdc_id | No | USDA FoodData Central ID, used by food_fdc_lookup. | |
| format | No | slim (default) returns a compact shape. full returns the raw Tandoor object. | |
| description | No | Free-text description. | |
| food_onhand | No | True marks the food on hand for your household. | |
| plural_name | No | Plural form, e.g. tomatoes. | |
| shopping_list_ids | No | Shopping list IDs, from list_shopping_lists. | |
| supermarket_category_id | No | Supermarket category ID, from list_supermarket_categories. |