tag @a remove sharp_tool
tag @a [hasitem={item=minecraft:stone_sword,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:iron_sword,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:golden_sword,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:diamond_sword,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:netherite_sword,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:stone_axe,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:iron_axe,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:golden_axe,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:diamond_axe,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=minecraft:netherite_axe,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:katana_black,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:katana_blue,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:katana_gold,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:katana_green,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:katana_pink,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:katana_red,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:fire_axe,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:machete,location=slot.weapon.mainhand}] add sharp_tool
tag @a [hasitem={item=true:meat_cleaver,location=slot.weapon.mainhand}] add sharp_tool