The crowbar tool can break spawners and drop the spawner item on ground by right clicking on a spawner.
There are some optional sections that can be used with this tool.
List of commands to be executed when using a crowbar on a spawner.
You can use the following placeholders in your commands:
%player%for the name of the player that broke the spawner.
%entity%for the spawner's entity type.
- Hold the tool in your hand.
- Right click on a spawner.