Gemini and AI agent tool calling

[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent: [400 Bad Request] * GenerateContentRequest.tools[0].function_declarations[6].parameters.properties[data].properties[children].items.properties[children].items: missing field. *

Some MCP servers trigger this tool-calling error, but it only seems to occur when using Gemini LLMs. Is there a known workaround (within n8n)?

我也遇到同樣的問題,仍在尋找解決方案…

切換到與 OpenAI 相容且支援工具呼叫的模型。
如果你是自行託管,試試在其周圍建置 LiteLLM 代理

1 個讚

感謝你的回覆 - 我需要使用 Gemini,我無法存取其他模型,而且我使用的是雲端服務,而非自託管版本。

我可以透過子工作流程作為工具或 HTTP 請求來解決問題,並呼叫 MCP 提供的特定工具,所以我不是完全被卡住,但這需要更多額外的工作和麻煩。