MCP server tool calls fail with "Invalid type for parameter <> in tool <>"

Hi there,

I connected an MCP server (mcp-pyzotero) in Cursor (succesfully connected according to Settings → MCP page). But when tools are called with parameters, Cursor reports an error of type

Invalid type for parameter '<>' in tool <>

Removing type hints in the tool definitions in the MCP server implementations solved the issue for me, suggesting a mismatch in how Cursor is calling the tools with how the MCP implementations does the type check. See this issue for details for my case: Type error during tool call in Cursor IDE Ā· Issue #3 Ā· gyger/mcp-pyzotero Ā· GitHub

The problem has been reported on the forum here before and seems to be specific to Cursor (no reports with Claude Desktop and this post also shows the tools work in MCP Inspector): Cursor cannot handle MCP server params
The issue was closed without response due to inactivity.

And a related post on the MCP GitHub:

I’m wondering why there are so few reports of this. Could it be a server implementation issue? Or is this actually an issue in how Cursor calls tools?

Would appreciate any feedback / solution.

Thanks!

Do not use Optional or Union in your tools parameters

1 Like

Me too.

I’m using the Figma-Context-MCP extension, and whenever I call the download_figma_images tool it always causes the following error:

Invalid type for parameter nodes in tool download_figma_images.

The MCP settings appear to be valid, and calling the get_figma_data tool works without any errors.

My Cursor environment:
Version: 0.49.4
VSCode Version: 1.96.2
Commit: ec408037b24566b11e6132c58bbe6ad27046eb90
Date: 2025-04-22T00:13:20.211Z
Electron: 34.3.4
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.4.0