Want to get the tool name on click

I am unable to get the tool name on clicking the tool(on tool header).
So, my requirement is that, I must be able to get the tool name whenever I am clicking any tool (on tool header) of any toolbarGroup.
Thank you

Hi nikhilhill19,

You can get the tool’s name with:

instance.UI.getToolMode().name
> 'AnnotationCreateEllipse'

Best regards,
Tyler