An injection molding tool for an injection molding machine, wherein the injection molding tool for manufacturing a component has a first tool element and a second tool element that can be moved towards the first tool element, wherein the component is a cover glass or an optical component that is a mounted filter and has a base body and a socket, wherein the base body is a base body made of glass or plastic and has a first surface, a second surface spaced from the first surface, and an edge, and the socket is an integral overmolded socket of a rigid plastic having an inner edge form-fittingly adjacent to the edge of the base body and which is adjacent to one of its two surfaces but not to the other, wherein the injection molding tool has: - a frame to which the first mold element is rigidly attached and by which the second mold element is movably held; - an adjusting element which limits the movement of the second tool element towards the first tool element to a maximum position, up to which the second tool element can be moved at most, and at which the dimension of the injection mold formed between the two tool elements has the minimum thickness, wherein the adjusting element is part of the second tool element, - a thickness compensating element formed between the second mold element and a stationary element that is arranged on the frame and on which the thickness compensating element is supported, and that limits the movement of the second mold element to a contact position in which the second tool element contacts a surface of the base body of the component to be molded around, wherein the thickness compensation element can absorb the force exerted on the second tool element to move it in the direction of its maximum position as soon as the second tool element strikes the surface of the base body, wherein the thickness compensating element stops the movement of the movable tool element in the contact position, and - a cavity which is bounded by the tool elements (201, 202) and the base body and into which plastic is injected to form the socket. - a frame to which the first mold element is rigidly attached and by which the second mold element is movably held; - an adjusting element which limits the movement of the second tool element towards the first tool element to a maximum position, up to which the second tool element can be moved at most, and at which the dimension of the injection mold formed between the two tool elements has the minimum thickness, wherein the adjusting element is part of the second tool element, - a thickness compensating element formed between the second mold element and a stationary element that is arranged on the frame and on which the thickness compensating element is supported, and that limits the movement of the second mold element to a contact position in which the second tool element contacts a surface of the base body of the component to be molded around, wherein the thickness compensation element can absorb the force exerted on the second tool element to move it in the direction of its maximum position as soon as the second tool element strikes the surface of the base body, wherein the thickness compensating element stops the movement of the movable tool element in the contact position, and - a cavity which is bounded by the tool elements (201, 202) and the base body and into which plastic is injected to form the socket.