A new tool powered by artificial intelligence has been used by surgeons in the UK for the first time.