The Groom of the Stool (formally styled: “Groom of the King’s Close Stool”) was the most intimate of an English monarch’s courtiers, initially responsible for assisting the king in excretion and hygiene.
The physical intimacy of the role naturally led to his becoming a man in whom much confidence was placed by his royal master and with whom many royal secrets were shared as a matter of course.
The office developed gradually over decades and centuries into one of administration of the royal finances, and under Henry VII, the Groom of the Stool became a powerful official involved in setting national fiscal policy, under the “chamber system”.[1][2]
https://en.m.wikipedia.org/wiki/Groom_of_the_Stool