Local models are trained on tool calling these days, and they can be pretty good at it, too.
Subroutines are usually small in size, which means they are much easier to write, test and debug. They are also easy for someone else to understand. As they are written outside of the main program, ...