The present invention relates to a device comprising a supply unit (2) for supplying ablation energy to a material (4), and a stimuli-responsive substance (3′) for controlling a level of the ablation energy deposited into the material (4). The device allows to limit a temperature of the material (4), so that risks associated to ablation at too high temperatures can be eliminated. The device may comprise at least one illumination unit (7) for illuminating the material (4), and at least one reception unit (8a, 8b) for receiving reflected light in order to obtain information about a state of the material (4). The obtained information can be used to regulate the supplied ablation energy.