Why does Gemini reject DesktopCommanderMCP tools in Cursor with an incompatible argument schema error?
A user running DesktopCommanderMCP in Cursor on Windows 11 (version 0.48.9) gets an error that the argument schema for set_config_value is incompatible with gemini-2.5-pro-exp-03-25. A later reporter saw a Gemini API 400 error saying a function name is invalid because it must start with a letter or underscore and use only allowed characters, up to 64 length.
Originally asked on GitHub: https://github.com/wonderwhy-er/DesktopCommanderMCP/issues/79
4 answers
The thread does not contain a confirmed fix. The issue is still open as of the last comments. The maintainer acknowledged the report on 2025-04-19 and said they would look into which part of the schema Gemini does not accept, but no commit or release addressing it is mentioned.
What the thread shows:
- Gemini models reject the tool declarations that the server sends, so the error appears when Gemini is selected in Cursor.
- A later report shows the concrete Gemini API error: a function declaration name is invalid. Gemini requires names that start with a letter or underscore, contain only a-z, A-Z, 0-9, underscores, dots, or dashes, and are at most 64 characters long. Check the tool names exposed by the server against these rules.
Workarounds mentioned: none were confirmed in the thread. As general advice, you can disable the MCP server while using Gemini, or switch to a model that accepts the current schema. Reporters in the thread only confirmed the problem persists.
Security note: none specific to this issue.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter used DesktopCommanderMCP inside Cursor on Windows 11 (Cursor 0.48.9) with gemini-2.5-pro-exp-03-25 and got a schema incompatibility error for the set_config_value tool. Asked for a fix.
Source: https://github.com/wonderwhy-er/DesktopCommanderMCP/issues/79 (opens external site)
Did this work for you?What @wonderwhy-er tried on GitHub (Outcome unclear)
Maintainer said they would investigate which part of the schema Gemini rejects. No change was reported.
Did this work for you?What @mubaidr tried on GitHub (Didn't work)
Another user reported the Gemini API 400 error about an invalid function name (tools[0].function_declarations[13].name) and its length and character constraints, confirming the problem persisted in July 2025.
Did this work for you?
Related questions
- Is there a way to rollback changes made by DesktopCommanderMCP?
- DesktopCommanderMCP: 'MCP error -32001: Request timed out' on startup with Claude Desktop
- DesktopCommanderMCP fails to attach under nvm: require() of ES modules is not supported
- search_code errors in DesktopCommanderMCP on Claude Desktop, then falls back to read_file/search_files
- DesktopCommanderMCP polls running processes in a loop and hits Claude limits — how to make it wait?