I’ve been using the AI Agent with Google Gemini 2.5 and it was working well, until I added a memory tool to it.
For whatever reason, it returns an error when the tool is connected:
“Received tool input did not match expected schema”
However I know this issue is specific to Google Gemini 2.5 because I can run it with Anthropic Claude 3.7 and it works perfectly. Notice how the gemini agent outputs an error whilst the Anthropic agent completes successfully:
This is with the latest version of n8n cloud (1.84.3)
I have tried:
- Returning the output without nodes in the tool workflow (works - but the tool is useless)
- As soon as I add a switch to the tool workflow (error)
- Specifically telling Gemini not to add code formatting to JSON outputs such as ```\ (error)
- Removing all other tools (error)
- Removing the Memory Tool (works)
- Changing metadata input from Object to String (error)
- Removing all predefined inputs (error)
- Restarting the server (error)
- Upgrading to latest version (error)
- Renaming the tool to “Store_Retrieve_Memories” (causes Claude Internal Server Error 500)
I’ve been running trial and error for the entire day and I’ve run out of ideas.
It works as-is with Anthropic Claude 3.7 without any workarounds. But it’s extremely unpredictable with Claude 2.5. Yet all the other tools you see above work fine with Claude 2.5. It’s ONLY the memory tool.
Any suggestions would be very welcome.