How do I scale a cube in OpenGL?

The idea is to make an arm consisting of three segments, each having a cube-like shape. For this I have made the cube inside a function called drawCube() – a set of 6 matrices (glm::mat4) translated and rotated to look like a cube – and would like to rescale this cube in order to make it longer or shorter as I please. I can’t do something of the sort glm::drawCube() cube = glm::scale(drawCube(), glm::vec3(1,2,3)) since drawCube() is not a variable type, so I don’t know how else to approach this.

So basically I created a 3D object and would like to rescale it as a whole instead of rescaling each individual matrix/vector. Is there such an option?