Describe the problem/error/question
The “Tools Agent” node in N8N does not seem to be working correctly with Gemini models. While it functions as expected with GPT models, when using Gemini, the agent fails to trigger the defined tools. Instead of executing the tool (e.g., sending an email or making an API call), the output shows what looks like the function call itself, such as print(default_api.Enviar_Guia_Disenos(input=True))
.
I also see that in this documentation, there is no mention of Tools Agent being compatible with Gemini Chat Models, but I want to make sure this is not outdated (as I see a lot of content combining Tools Agent + Gemini):
Is there a different way or something to take into account before using Gemini to build Agents?
What is the error message (if any)?
There is no specific error message from N8N. The output of the “Tools Agent” node when using Gemini models is the string representation of what appears to be the intended tool call, rather than the result of the tool execution.
Please share your workflow
Share the output returned by the last node
When using a Gemini model, the “Tools Agent” node outputs a string like:
print(default_api.Enviar_Guia_Disenos(input=True))
Instead of the action defined in the tool “Enviar_Guia_Disenos” being executed.
Information on your n8n setup
- n8n version: 1.84.1 (But this is happening with all versions)
- Database (default: SQLite): Postgress
- n8n EXECUTIONS_PROCESS setting (default: own, main): own
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Linux