Microtip-assisted metal–insulator transition in a layered chalcogenide