However, if you install the simplest one to use is pyautogui library for python which provides ways for you to send keys/mouse events to the interface, then you can switch the tools.
I am on Linux so I only know how to install pyautogui for Python 2.7 which my GIMP uses with the below commands
pip install pyautogui
pip install python-xlib
After that inside GIMP.
I added an extra import statement as below:
from pyautogui import press, typewrite, hotkey
then at end of script, if I wanted it to auto-switch to the Move tool for example by hitting the 'm' key
then i added the line
more details on pyautogui here -> https://pyautogui.readthedocs.io/en/lat ... sheet.html
I imagine this can be done on windows too, the .py script/plug-in doesn't need to be changed but the installation of pyautogui might be different on Windows. If you're on Windows and you've successfully installed pyautogui and got plug-ins to successfully switch tool like I menioned...please add answer below (to out knowledge base).