It seems stupid to even try to get an LLM to do deterministic tasks. You'll harm the product by trying to make it something that it isn't.
Seems much more sensible to give it modules that perform the task and give it access to those which I believe is how Google Assistant used to work.