Skip to content

Commit 558411c

Browse files
move include 'atlas-local' enabled check earlier
1 parent c436204 commit 558411c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/server.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ export class Server {
201201
}
202202

203203
private async registerAtlasLocalTools(): Promise<void> {
204+
// If Atlas Local tools are disabled, don't attempt to connect to the client
205+
if (this.userConfig.disabledTools.includes("atlas-local")) {
206+
return;
207+
}
208+
204209
try {
205210
// Import Atlas Local client asyncronously
206211
// This will fail on unsupported platforms
@@ -216,11 +221,6 @@ export class Server {
216221
// Register Atlas Local tools
217222
this.registerToolInstances(AtlasLocalTools);
218223
} catch (error) {
219-
// If Atlas Local tools are disabled, don't log an error
220-
if (this.userConfig.disabledTools.includes("atlas-local")) {
221-
return;
222-
}
223-
224224
console.warn(
225225
"Failed to initialize Atlas Local client, atlas-local tools will be disabled (error: ",
226226
error,

0 commit comments

Comments
 (0)