Nevermind, I have solved it.
It would seem that the best way to accomplish what I wanted was to create a custom work definition, with a custom handler that provided the services that I needed. It was simple enough to pass the required variables, and get a return value.
I wish there was more documentation for correctly getting a return value, however the examples helped.