Wouldn't this work?
```coffee
ui.switchToTool @
```