It won't work because Bot can hold one tool, but it's not full of it's capacity. So after taking wooden shovel, the first loop keep repeating because Bot can hold more but at the same time he can hold only one tool.
Delete first "repeat" and leave second one. In that way Bot will take shovel and start repeating second loop until shovel break.