When Ra retired from the Earth, he appointed Thoth and told him of his desire to create a Light-soul in the Duat and in the Land of the Caves, and it was over this region that the sun god appointed Thoth to rule, ordering him to keep a register of those who were there, and to mete out just punishments to them. Thoth became the representation of Ra in the afterlife, seen at the judgement of the dead in the 'Halls of the Double Ma'at'. The magical powers of Thoth were so great, that the Egyptians had tales of a 'Book of Thoth', which would allow a person who read the sacred book to become the most powerful magician in the world. The Book which "the god of wisdom wrote with his own hand" was, though, a deadly book that brought nothing but pain and tragedy to those that read it, despite finding out about the "secrets of the gods themselves" and "all that is hidden in the stars". So if Thoth does work for Ra this would make him a "Sun priest".