Gemini 2.0 Will Not Access Tools

Not sure if anyone has had this issue yet, but no matter WHAT I do, when using an AI Agent with Google Gemini 2.0 it will not access any tools.

I’m bringing this here because I am not sure if this is a Gemini issue or an n8n/Langchain issue.

But, if I run any workflow at all with an AI Agent using Gemini 2.0, you can see that all nodes activate except any tools.

Information on your n8n setup

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

Hey @anthony.lee_hah

Could you share a screenshot of what your template looks like?
I was able to get Gemini-2.0-flash-exp to work with tools with the following example.

One thing to possibly look out for is chat memory. If Gemini sees it has failed using tools previously, it won’t try again. Try clearing the chat memory or disconnect the chat memory subnode and try again?

This is what we are using now, with OpenAI as the llm for the agent. But whenever I used Gemini 2.0, it would never access the vector store.

And actually, now that I am typing this I realize that it was always a vector store tool that it would not access. I didn’t test it with other tools.

sabe problem here

In my case Gemini 2.0 trowing an error when chat node isn’t connected.

Bad request - please check your parameters
[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp:streamGenerateContent?alt=sse: [400 Bad Request] * GenerateContentRequest.contents[21].parts: contents.parts must not be empty.

Same issue here, did anyone managed to find a solution?

I found that with Google AI that if your tool doesn’t have a {{ $fromAI(“id”, “”) }} then it will fail, as soon as you put it in the tool will work.

3 Likes

I am experiencing the same issue. In my case the tool is a workflow trigger.

@JamesP solution is working for me.

What did you do exactly? cold you write an example please? I am a novel on n8n. Thanks in advance.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.