delete_meal_item
Remove a specific meal entry from your nutrition log by providing its item ID. This action helps maintain accurate food tracking records in your personal fitness database.
Instructions
Delete a meal item.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes |
Implementation Reference
- src/main.py:588-596 (handler)Implementation of the delete_meal_item MCP tool, which removes a record from the meal_items table in the database.
@app.tool() def delete_meal_item(item_id: int) -> dict[str, bool]: """Delete a meal item.""" conn = get_connection() cursor = conn.cursor() cursor.execute("DELETE FROM meal_items WHERE id = ?", (item_id,)) conn.commit() conn.close() return {"deleted": cursor.rowcount > 0}