Google has replaced chat_template.jinja and tokenizer_config.json a few days ago in gemma-4-31B-it, which is supposed to have solved some problems related to tool invocation.
So if you have not updated your model, you should do it.