Plugin is in tooling mode?

Hi!

I am writing a gradle plugin. My question is: how we can determine the plugin is executed in tooling mode (called by the IDE) or not?

Thanks in advance!