I’ve created a custom MCP Server that works correctly when accessed by a MCP Client using certain chat models nodes. It performs well with Google Gemini and OpenAI, but when I use Ollama or Groq, I encounter an error stating: “Non-string message content not supported.”
tl,dr: put an “Edit Field” node and pass all data, then reference this in the Agent using Groq model.
I had the same problem when trying to send text extracted from a PDF
But I noticed that when I sent text from another kind of node, the problem didn`t happen
So I tried putting and Edit Field node between the “Extract from file” node and the Agent node, where the output is identical to the input.
I’m still unable to figure this out because I can’t modify the data being sent by the MCPServer. When the agent calls a tool from the server using the MCPClient, I have no way to intercept or alter the content during that process.
I have the same problem and that’s exactly as [Hamza_Idrissi] said, using Groq LLM and trying to get a simple Google Sheet data list, but there is the “non string message content not supported” error “error” there is an error.