-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
What happened?
Summary
gemini fails for every conversation prompt with a 400 error when the Notion MCP server is enabled. As soon as I disable that MCP entry in settings.json, the CLI works normally again.
Observed error
╭────────╮
│ > hi │
╰────────╯
✕ [API Error: {"error":{"message":"{\n "error": {\n "code": 400,\n "message": "A FunctionDeclaration in the request exceeds the maximum allowed
nesting depth.",\n "status": "INVALID_ARGUMENT"\n }\n}\n","code":400,"status":"Bad Request"}}]
╭───────────╮
│ > hello │
╰───────────╯
✕ [API Error: {"error":{"message":"{\n "error": {\n "code": 400,\n "message": "A FunctionDeclaration in the request exceeds the maximum allowed
nesting depth.",\n "status": "INVALID_ARGUMENT"\n }\n}\n","code":400,"status":"Bad Request"}}]
Minimal settings excerpt (before)
{
"mcpServers": {
"notionMCP": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.notion.com/mcp"]
}
}
}
Workaround (after)
Commenting out or removing just the Notion MCP entry makes the CLI work again:
{
"mcpServers": {
// "notionMCP": {
// "command": "npx",
// "args": ["-y", "mcp-remote", "https://mcp.notion.com/mcp"]
// }
}
}
What did you expect to happen?
Prompts should succeed even with Notion MCP enabled.
Client information
- CLI Version: 0.1.18-nightly.250810.c632ec8b
- Git Commit: c632ec8
- Operating System: linux v20.19.3
- Sandbox Environment: no sandbox
- Model Version: gemini-2.5-pro
- Memory Usage: 138.0 MB
Login information
API key
Anything else we need to know?
-
The failure reproduces consistently with any simple prompt.
-
Disabling only the Notion MCP (leaving other MCP servers intact) removes the error, suggesting the failure is triggered by this server’s FunctionDeclarations (likely exceeding the API’s nesting-depth constraints).