Yep. When a command is entered, its parameters are parsed in an argv-like structure you can query with Cmd_Argv(). That essentially means you can only call it when parsing/executing a command.
can't believe there isn't a way to utilize what's already there, but for now, I just copied the code from the function I wanted to use into my own custom function.