Update food
update_foodModify a Tandoor food record by ID to change its name, property values, and shopping lists; set or remove property types and replace list assignments while preserving other values.
Instructions
Update food (PATCH). Required: id. Optional properties[] {property_type_id, property_amount} sets one value per property type (amount null = unknown), updating the existing value of that type in place and deleting any duplicate values of that type; remove_property_type_ids[] deletes values by type. Other existing property values are kept. A type may appear once across both lists. properties_food_amount and properties_food_unit_id set the food amount the property values refer to (e.g. 100 g); properties_food_unit_id null clears the unit. Deleting a property row removes it from every food or recipe it is linked to. If a row delete fails, the food is already updated and the tool returns an error naming those rows. shopping_list_ids replaces the food's lists; [] clears them; omit it to keep them. 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": {
"id": "<id>"
},
"name": "update_food"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Food ID, from list_foods. | |
| name | No | New food name. | |
| 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. | |
| properties | No | Property values to set, one per type. | |
| description | No | Free-text description. | |
| food_onhand | No | True or false sets on hand for your household. | |
| plural_name | No | Plural form, e.g. tomatoes. | |
| shopping_list_ids | No | Replaces the food's shopping lists; [] clears them. | |
| properties_food_amount | No | Food amount the property values refer to, e.g. 100. | |
| properties_food_unit_id | No | Unit ID for properties_food_amount, from list_units. | |
| supermarket_category_id | No | Supermarket category ID, from list_supermarket_categories. | |
| remove_property_type_ids | No | Property type IDs whose values to delete. |