Sure, you can put that API call in a M code macro script. Then just call that M code in your G code.
If I don't have a fixture setup, I typically start my machine and do a tool change via MDI to my edge finder or probe anyway, no matter what tool is the current tool.
Steve