Well, serverCmdUseTool( client, slot ) is sent to the server every time the client wishes to change to another inventory slot. You could simply save a variable every time the client sends this (doing some if checks to make sure that they should be sending that first of course). I don't remember if there is already a default variable specifying the currently active slot, but at least the previously mentioned method would work.
client.currTool, I believe. And also: client.slot[ client.currTool ].