# Gemini Printing Tool Calls Instead of doing them - Tools Agent Node Not Compatible with Gemini

**URL:** <https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225>\
**Category:** Questions\
**Tags:** ai, gemini\
**Created:** [March 29, 2025, 12:27am UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225 "2025-03-29T00:27:43Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Disowned-factory](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/disowned-factory/32/60434_2.png) [@Disowned-factory](https://community.n8n.io/u/Disowned-factory)\
**Post date:** [March 29, 2025, 12:27am UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/1 "2025-03-29T00:27:43Z")

</div>

## 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):

> **[Tools AI Agent node documentation | n8n Docs](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/tools-agent/)**
>
> Learn how to use the Tools Agent of the AI Agent node in n8n. Follow technical documentation to integrate the Tools Agent into your workflows.

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

---

<div class="post-metadata">

**Author:** ![ThinkBot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thinkbot/32/62172_2.png) [@ThinkBot](https://community.n8n.io/u/ThinkBot)\
**Post date:** [March 30, 2025, 9:17pm UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/2 "2025-03-30T21:17:44Z")

</div>

You may want to add much greater descriptions to your tool calls and to explain how inputs work/arguments etc.

---

<div class="post-metadata">

**Author:** ![Disowned-factory](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/disowned-factory/32/60434_2.png) [@Disowned-factory](https://community.n8n.io/u/Disowned-factory)\
**Post date:** [April 1, 2025, 4:35pm UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/3 "2025-04-01T16:35:27Z")

</div>

That is already done, and the agent is able to call the tools, but some times it suddenly prints the call instead of actually calling it…

---

<div class="post-metadata">

**Author:** ![ThinkBot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thinkbot/32/62172_2.png) [@ThinkBot](https://community.n8n.io/u/ThinkBot)\
**Post date:** [April 3, 2025, 5:38pm UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/4 "2025-04-03T17:38:43Z")

</div>

What model are you trying to use exactly? Unsure if I saw.

---

<div class="post-metadata">

**Author:** ![Disowned-factory](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/disowned-factory/32/60434_2.png) [@Disowned-factory](https://community.n8n.io/u/Disowned-factory)\
**Post date:** [April 3, 2025, 5:58pm UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/5 "2025-04-03T17:58:19Z")

</div>

Specially with Gemini 2.0 flash.

Thanks

---

<div class="post-metadata">

**Author:** ![ThinkBot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thinkbot/32/62172_2.png) [@ThinkBot](https://community.n8n.io/u/ThinkBot)\
**Post date:** [April 3, 2025, 6:14pm UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/6 "2025-04-03T18:14:26Z")

</div>

Have you tried starting with only one or two tool calls and improving the descriptions? To help see if something odd is going on because of how many tool calls are there.

---

<div class="post-metadata">

**Author:** ![Disowned-factory](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/disowned-factory/32/60434_2.png) [@Disowned-factory](https://community.n8n.io/u/Disowned-factory)\
**Post date:** [April 11, 2025, 11:52am UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/7 "2025-04-11T11:52:54Z")

</div>

Okey, let me check…

---

<div class="post-metadata">

**Author:** ![Disowned-factory](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/disowned-factory/32/60434_2.png) [@Disowned-factory](https://community.n8n.io/u/Disowned-factory)\
**Post date:** [April 24, 2025, 8:47am UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/8 "2025-04-24T08:47:05Z")

</div>

I have been checking and no, this is not solved.

This has to be some incompatibility with Gemini.

No matter which Gemini Model I use, it always happens, but it doesn´t as soon as I change to one of OpenAI (even the dumbest ones)…

---

<div class="post-metadata">

**Author:** ![ThinkBot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thinkbot/32/62172_2.png) [@ThinkBot](https://community.n8n.io/u/ThinkBot)\
**Post date:** [April 26, 2025, 8:02pm UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/9 "2025-04-26T20:02:56Z")

</div>

So I encountered something similar, and being explicit in the sys prompt and user prompt to not wrap any of its values or tool calls in formatting strings / backticks seems to have solved it for me. Unsure if that is the same issue.

---

<div class="post-metadata">

**Author:** ![Edson\_Alanis](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/edson_alanis/32/51788_2.png) [@Edson\_Alanis](https://community.n8n.io/u/Edson_Alanis)\
**Post date:** [May 8, 2025, 12:07pm UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/10 "2025-05-08T12:07:10Z")

</div>

This error is happening to me quite frequently, but not always. It seems that there comes a time when the AI ​​Agent gets lost and instead of calling the tool, it prints a log of the tool’s execution.  
I don’t know what else to do to solve this problem. I don’t know if it has a direct relationship with Gemini because I don’t use another model to test.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [August 6, 2025, 12:07pm UTC](https://community.n8n.io/t/gemini-printing-tool-calls-instead-of-doing-them-tools-agent-node-not-compatible-with-gemini/94225/11 "2025-08-06T12:07:18Z")

</div>

Closed on August 6, 2025, 12:07pm UTC

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