langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Gemini API not registering Mcp tools

Open lice-reis opened this issue 1 year ago • 1 comments

Bug Description

Bug using Gemini API in Langflow when working with MCP tools. In a flow where the MCP connection exposes tools as a list (not directly referenced), the tools work correctly when using OpenAI models. However, when switching to Gemini (Google Gen AI), the tools are not recognized — the list appears empty.

Passing the tools explicitly as an array (as required by Gemini) causes them to disappear entirely.

Discord ticket: https://discordapp.com/channels/1116803230643527710/1402363540488327391

Reproduction

  1. Load a flow with an MCP connection and agent.

  2. The MCP tools are provided as a list from the server.

  3. Run using OpenAI — tools are detected.

  4. Switch to Gemini — tools are not detected.

Expected behavior

The Gemini model should be able to recognize tools from the MCP connection either from a list or when explicitly passed as an array.

Who can help?

@italojohnny

Operating System

(Not specified)

Langflow Version

1.5.0

Python Version

None

Screenshot

No response

Flow File

No response

lice-reis avatar Aug 05 '25 22:08 lice-reis

Verified on Langflow v1.9.0 (latest) — this issue appears to be resolved.

The Agent (Gemini) was able to successfully discover and invoke MCP tools across multiple categories.

All tools were correctly listed, selected, and called by the Gemini model - including enum types and nested object schemas, which were specifically problematic in the original report.

Closing as resolved.

lice-reis avatar Apr 16 '26 00:04 lice-reis