The near-infrared (NIR) wavelength range offers some unique spectral features, and it is less prone to the extinction than the optical one. Recently, the first flux calibrated NIR library of cool stars from the NASA Infrared Telescope Facility (IRTF) have become available, and it has not been fully exploited yet. We want to develop spectroscopic diagnostics for stellar physical parameters based on features in the wavelength range 1-5 micron. In this work we test the technique in the I and K bands. The study of the Y, J, H, and L bands will be presented in the following paper. An objective method for semi-empirical definition of spectral features sensitive to various physical parameters is applied to the spectra. It is based on sensitivity map--i.e., derivative of the flux in the spectra with respect to the stellar parameters at a fixed wavelength. New optimized indices are defined and their equivalent widths (EWs) are measured. A number of sensitive features to the effective temperature and surface gravity are re-identified or newly identified clearly showing the reliability of the sensitivity map analysis. The sensitivity map allows to identify the best bandpass limits for the line and nearby continuum. It reliably predicts the trends of spectral features with respect to a given physical parameter but not their absolute strengths. Line blends are easy to recognize when blended features have different behavior with respect to some physical stellar parameter. The use of sensitivity map is therefore complementary to the use of indices. We give the EWs of the new indices measured for the IRTF star sample. This new and homogeneous set of EWs will be useful for stellar population synthesis models and can be used to get element-by-element abundances for unresolved stellar population studies in galaxies.