clamp is a core script function, it takes a float value and return the value if inside the range, or min/max if outside the range.
3D, 2D, control nodes, resources, makes no difference
https://docs.godotengine.org/en/stable/classes/[email protected]#class-gdscript-method-clamp
it's like saying that sin(x)
only works in 2D
you are probably confusing with the method Vector2(x,y).clamped(10), which returns a vector2 whose length is clamped.
in that case, you can easily workaround with the below formula (which is true both in 2D and 3D)
vec.clamped(value)=vec.normalized*min(vec.length(), value)