My problem is that each time "player's tool" is an item with an enchantment my command won't work and I believe it is because it prints %player's tool% like this "diamond_sword of Efficiency 5 " but because there is spaces between sword and of and between of and efficiency and so on, it makes the command think that its more than one argument and therefore my command won't work as intended. so my question is, are there any way I can fix that or maybe go around it some other way? 
some of my code is right here:
some of my code is right here:
Code:
on chat:
if {vagtkiste.tilføj.værdi.%player%} is true:
cancel event
set {_message} to message parsed as integer
if {_message} is a number:
execute player command "/vagtkiste items tilføj item %player's tool% %{_message}%"
else if message is "!cancel":