We introduce a pencil-beam infrared AOTF spectrometer for context assessment of the surface mineralogy in the vicinity of a planetary probe or a rover analyzing the reflected solar radiation in the near infrared range. One application is the ISEM (Infrared Spectrometer for ExoMars) instrument to be deployed on the mast of ExoMars Rover planned for launch in 2018. A very similar instrument LIS (Lunar Infrared Spectrometer) is planned to be flown on Russian Luna-25 (Luna Globe Lander) and Luna-27 (Luna Resource Lander) missions in 2018 and 2021 respectively. On the lunar landers the instrument will be mounted at a robotic arm (Luna-25) or at a dedicated mast (Luna-27). The instrument covers the spectral range of 1.15–3.3 μm with the spectral resolution of ~25 cm-1 and is intended to study mineralogical and petrographic composition of the uppermost layer of the regolith. Both the Mars and the Moon instruments target waterbearing minerals, phyllosilicates, sulfates, carbonates in the vicinity of the Mars rover, and H2O ice and hydroxyl in the vicinity of lunar lander. The optical scheme includes entry optics, the TeO2 AOTF, and a Peltier-cooled InAs detector. To cover the extended spectral range the AOTF is equipped with two piezotransducers. At present the qualification prototype of the instrument is being characterized. The requirements, instrument optics, and different aspects of its characterization, including low-temperature survival validation is described.