There are a few errors in here. For example you have client....stuff instead of %client....stuff. Anyways, this may help you.
i haven't tested this, nor does it have proper checks, but this should help you.
function switchTools(%client1,%client2)
{
//I think the variable to check a datablocks max tools is
//datablock.maxTools , but we'll use 5 because I'm doing
//this off of memory
for(%i=0;%i<5;%i++)
{
%t[%client1,%i] = %client1.player.tool[%i];
%t[%client2,%i] = %client2.player.tool[%i];
%client1.player.tool[%i] = %t[%client2,%i];
messageClient(%client1, 'MsgItemPickup', '', %i, %t[%client2,%i]);
%client2.player.tool[%i] = %t[%client1,%i];
messageClient(%client2, 'MsgItemPickup', '', %i, %t[%client1,%i]);
}
}