You may need to select and use a specific tool in your script. The simplest approach is to select the tool in the user interface, and then execute the following command to query the current context.
currentCtx
You will obtain a result similar to the following:
// Result: moveSuperContext //
You can then include this line in your script:
setToolTo moveSuperContext
A second simple approach is to select Windows > Settings/Preferences > Hotkey Editor to open the Hotkey Editor. This editor lists the corresponding runtime command for every menu item and editor.
Open the defaultRunTimeCommands.mel file in the scripts\startup folder of the installation directory and search for SetToolto.
All available tools are listed in this file, and you will get results such as this:
runTimeCommand -default true -annotation (uiRes("m_defaultRunTimeCommands.kInsertEdgeLoopToolOptionsAnnot")) -category ("Other items.Edit Mesh") -command ("polySelectEditCtx -e -mode 1 polySelectEditContext; setToolTo polySelectEditContext; toolPropertyWindow") -showInHotkeyEditor false InsertEdgeLoopToolOptions;