i may be overthinking this but my solution is to compare the item to a list containing its related item groups
tools could be (sword, pickaxe, axe, shovel, hoe) and armor can be (helmet, chestplate, leggings, boots)
it's probably not the most optimal or efficient way to do it - but there are no armor & tool types afaik (maybe there's an alias?)
broadcast "tool" if (sword, pickaxe, axe, shovel, hoe) contains %item%
broadcast "armor" if (helmet, chestplate, leggings, boots) contains %item%
and then set the