@@ -65,7 +65,7 @@ export class ConnectClusterTool extends AtlasToolBase {
6565 private async prepareClusterConnection (
6666 projectId : string ,
6767 clusterName : string
68- ) : Promise < [ string , AtlasClusterConnectionInfo ] > {
68+ ) : Promise < { connectionString : string ; atlas : AtlasClusterConnectionInfo } > {
6969 const cluster = await inspectCluster ( this . session . apiClient , projectId , clusterName ) ;
7070
7171 if ( ! cluster . connectionString ) {
@@ -124,7 +124,8 @@ export class ConnectClusterTool extends AtlasToolBase {
124124 cn . username = username ;
125125 cn . password = password ;
126126 cn . searchParams . set ( "authSource" , "admin" ) ;
127- return [ cn . toString ( ) , connectedAtlasCluster ] ;
127+
128+ return { connectionString : cn . toString ( ) , atlas : connectedAtlasCluster } ;
128129 }
129130
130131 private async connectToCluster (
@@ -229,7 +230,7 @@ export class ConnectClusterTool extends AtlasToolBase {
229230 case "disconnected" :
230231 default : {
231232 await this . session . disconnect ( ) ;
232- const [ connectionString , atlas ] = await this . prepareClusterConnection ( projectId , clusterName ) ;
233+ const { connectionString, atlas } = await this . prepareClusterConnection ( projectId , clusterName ) ;
233234
234235 // try to connect for about 5 minutes asynchronously
235236 void this . connectToCluster ( projectId , clusterName , connectionString , atlas ) . catch (
0 commit comments