Thoth’s roles in Egyptian mythology were many. He served as a mediating power, especially between good and evil, making sure neither had a decisive victory over the other. He also served as scribe of the gods, credited with the invention of writing and alphabets (i.e. hieroglyphs) themselves. In the underworld, Duat, he appeared as an ape, A’an, the god of equilibrium, who reported when the scales weighing the deceased’s heart against the feather, representing the principle of Ma’at, was exactly even .
The ancient Egyptians regarded Thoth as One, self-begotten, and self-produced. He was the master of both physical and moral (i.e. Divine) law, making proper use of Ma’at. He is credited with making the calculations for the establishment of the heavens, stars, Earth, and everything in them. Compare this to how his feminine counterpart, Ma’at was the force which maintained the Universe. He is said to direct the motions of the heavenly bodies. Without his words, the Egyptians believed, the gods would not exist. His power was unlimited in the Underworld and rivaled that of Ra and Osiris.