Not sure if you can. I have no experience with creating tools, but from the examples and my short test to implement your idea, I can say that it is impossible
Looks like you can only pass device variables/information to the tools. So, no functions available.
What you could do is, set the IPMI ip address of each device in one of the custom fields of the device settings. This way, you could access the ip address from the tool as a device variable.