That does set tool as far as robot is concerned. But this has nothing to with HMI.
In fact tool_data[4[ is simply a variable of type frane, and the line simply copies the value blindly to $TOOL. Beyond that, the index value is lost or not processed in any way.
Also tool_data[] array is not even a system variable... Just like
decl frame my_tool[500]
;
$tool = my_tool[487]
So how is KSS to know what to do with 4 or 487? The answer is simple...it does not so it does nothing.
If you want HMI to display the tool index, you need to write code that does just that if i recall, variable name is $ACT_TOOL
Check punned topic READ FIRST for info on getting documentation...