See if these help.

https://duet3d.dozuki.com/Wiki/Macros#Section_Tool_change
https://duet3d.dozuki.com/Wiki/Gcode#Section_T_Select_Tool
https://duet3d.dozuki.com/Wiki/Multiple_tools_and_Tool_change_macros
https://forum.duet3d.com/topic/6504/tool-changer-commands/20