identify context

added feature to detect the current tool context