Food Management Tool (manage_food)
The manage_food tool is the primary interface for all nutrition tracking and management within SparkyFitness. It allows users and AI agents to search for food, log meals, create custom food items, and manage their daily food diary.
Tool Name: manage_food
Description: Primary tool for nutrition tracking. Use this to search for food, log meals, create custom food items, and manage your daily diary. Supports multi-turn conversations where you provide details one by one.
Actions
The manage_food tool supports the following actions:
search_food
- Description: Search for existing food items in the database.
- Parameters:
food_name(string): The name of the food item to search for.search_type(enum: "exact", "broad"): The type of search to perform.
log_food
- Description: Logs a food item to your daily diary. Handles both existing and new food items.
- Parameters:
food_name(string): The name of the food item.food_id(string, optional): UUID of the food item (if known).variant_id(string, optional): UUID of the food variant (if known).quantity(number): The amount consumed.unit(string): The unit of measurement (e.g., 'g', 'piece', 'serving').meal_type(string): The meal timeframe (e.g., 'breakfast', 'lunch', 'dinner', 'snacks').entry_date(string, YYYY-MM-DD): The date of the record.
- Special Handling for Unknown Foods: If
food_nameis not found, the AI will be instructed to infer nutritional details and create the food viacreate_foodbefore re-attempting to log.
create_food
- Description: Creates a new custom food item in the database with its nutritional information.
- Parameters:
food_name(string): The name of the new food item.brand(string, optional): The brand name of the food.macros(object): Nutritional information for the food.calories(number)protein(number)carbs(number)fat(number)saturated_fat(number)polyunsaturated_fat(number)monounsaturated_fat(number)trans_fat(number)cholesterol(number)sodium(number)potassium(number)fiber(number)sugar(number)vitamin_a(number)vitamin_c(number)calcium(number)iron(number)gi(string, enum: "None", "Very Low", "Low", "Medium", "High", "Very High")
quantity(number, optional): The default serving size value.unit(string, optional): The default serving size unit.
search_meal
- Description: Search for existing meal templates.
- Parameters:
meal_name(string): The name of the meal template to search for.
log_meal
- Description: Logs a predefined meal template to your daily diary.
- Parameters:
meal_id(string, optional): UUID of the meal template (if known).meal_name(string, optional): Name of the meal template (alternative to ID).meal_type(string): The meal timeframe.entry_date(string, YYYY-MM-DD): The date of the record.quantity(number, optional): Multiplier for the meal template.unit(string, optional): Unit for the meal template multiplier.
list_diary
- Description: Retrieves all logged food and meal entries for a specific date.
- Parameters:
entry_date(string, YYYY-MM-DD, optional): The date to retrieve the diary for. Defaults to today.
delete_entry
- Description: Deletes a specific food or meal entry from the diary.
- Parameters:
entry_id(string): UUID of the entry to delete.entry_type(enum: "food_entry", "food_entry_meal"): The type of entry.
update_entry
- Description: Updates the quantity or unit of an existing food or meal entry.
- Parameters:
entry_id(string): UUID of the entry to update.entry_type(enum: "food_entry", "food_entry_meal"): The type of entry.quantity(number): The new amount.unit(string): The new unit of measurement.
copy_from_yesterday
- Description: Copies all food entries from a source date (defaults to yesterday) to a target date (defaults to today) for a specific meal type.
- Parameters:
target_date(string, YYYY-MM-DD, optional): The date to copy entries to.source_date(string, YYYY-MM-DD, optional): The date to copy entries from.meal_type(string, optional): The specific meal type to copy (e.g., 'breakfast').
save_as_meal_template
- Description: Saves a set of food entries from a specific date and meal type as a new reusable meal template.
- Parameters:
entry_date(string, YYYY-MM-DD): The date from which to save entries.meal_type(string): The meal type to save (e.g., 'lunch').meal_name(string): The name for the new meal template.description(string, optional): A description for the meal template.
