You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
connectionString: z.string().describe("MongoDB connection string (in the mongodb:// or mongodb+srv:// format)"),
14
+
})
15
+
.describe("Options for connecting to MongoDB.");
16
+
17
+
constconnectedSchema=z
18
+
.object({
19
+
connectionString: z
20
+
.string()
21
+
.optional()
22
+
.describe("MongoDB connection string to switch to (in the mongodb:// or mongodb+srv:// format)"),
23
+
})
24
+
.describe(
25
+
"Options for switching the current MongoDB connection. If a connection string is not provided, the connection string from the config will be used."
26
+
);
27
+
28
+
constconnectedName="switch-connection"asconst;
29
+
constdisconnectedName="connect"asconst;
30
+
31
+
constconnectedDescription=
32
+
"Switch to a different MongoDB connection. If the user has configured a connection string or has previously called the connect tool, a connection is already established and there's no need to call this tool unless the user has explicitly requested to switch to a new instance.";
33
+
constdisconnectedDescription="Connect to a MongoDB instance";
6
34
7
35
exportclassConnectToolextendsMongoDBToolBase{
8
-
protectedname="connect";
9
-
protecteddescription="Connect to a MongoDB instance";
"Options for connecting to MongoDB. If not provided, the connection string from the config://connection-string resource will be used. If the user hasn't specified Atlas cluster name or a connection string explicitly and the `config://connection-string` resource is present, always invoke this with no arguments."
0 commit comments