Just a thought:- could a proximity sensor work here - Don't know how the tool geometry would affect the sensing distance.