It might have been originally 'Gemotsushiki' under the direct command of the emperor, which was incorporated into Nakatsukasasho when the ritsuryo code took effect.
もともとは天皇直属の「下物職」であったらしく律令施行によって中務省に組み込まれた。