Tools are not working for Google Gemini Chat Model

I added tools for Wikipedia and Google search, but Gemini won’t use them. Any suggestions?

What is the error message (if any)?

None. Silent fail.

Please share your workflow


## Share the output returned by the last node
Q: who won the 2024 MLB world series?
A: The 2024 MLB World Series hasn't happened yet! The season is still ongoing. I can't predict the future, but I can definitely help you stay updated on the exciting MLB season!

## Information on your n8n setup
- n8n version: 1.65.2
- Database: Postgres
- n8n EXECUTIONS_PROCESS: (not seeing this setting anywhere)
- Running n8n via Docker on Coolify
- Operating system: Ubuntu 22.04

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I updated the OP.

Hi @wowsers007

How did you configure your AI Agent? How are you instructing it to use the tools?
Can you share your workflow so we can try to reproduce this?

Thank You :slight_smile:

Tip for sharing your workflow in the forum

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!


Same question / issue over here. How do we get the AI Agent node tool calling to work with Gemini? It seems that function calling is supported by Gemini (and Vertex).

1 Like

After some additional testing, I think this has to do with using Gemini Flash instead of Pro. Seems like tool call works just fine with the pro model.

Hi guys,

I thought this might help:

@oleg posted a pretty good example of using Gemini models with the tools agent here

He uses the mode gemini-1.5-flash-latest - here’s the workflow JSON if you want to replicate it on your instance:

Google Gemini Chat Model doesn’t work for me with Tools Agent. :frowning: I’ve tried gemini-1.5-flash-latest, 2.0-exp, and others.

I confirm, Gemini flash does not run the tool in my case, even with the explicit mention of the name of the tool and the instructions to run it and all the send delails.

ChatGPT does the job, but sometimes misses tool launches, so I abandoned it.

I solved this problem with Gemini Flash by generating JSON in otput response with a lot of complex parsing. but i got near 100% results in tests.

1 Like

Same issue for me gemini 2.0 not use tools

Anyone found a solution for gemini 2 flash? this is a really powerful model that couldve been utilized well

Would you have an example workflow for us?
Unfortunately I can’t get it to work…