You didn't show the code of your package, so I am assuming the code you provided was wrapped by the package commands.
As I understand things, code (including packages and functions) must be evaluated before they will work as expected.
Of course, since the Wolfram language is symbolic, you will often get an answer, even if packages and functions are not yet evaluated.
There are several ways to get your package evaluated before the code that uses it:
- Shift-enter (or use the evaluation menu) in the cell that contains the package
- You can put the package code into another file and use Needs[] to evaluate the package
- You can put the package code into another file and evaluate it with Needs at start up in your kernel/init.m file
- and more
Good Luck