@himanshusinghs/mongodb-mcp-server 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/common/connectionErrorHandler.js +1 -1
- package/dist/cjs/lib.d.ts +1 -0
- package/dist/cjs/lib.d.ts.map +1 -1
- package/dist/cjs/lib.js.map +1 -1
- package/dist/esm/common/connectionErrorHandler.js +1 -1
- package/dist/esm/lib.d.ts +1 -0
- package/dist/esm/lib.d.ts.map +1 -1
- package/dist/esm/lib.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ const errors_js_1 = require("./errors.js");
|
|
|
5
5
|
const connectionErrorHandler = (error, { availableTools, connectionState }) => {
|
|
6
6
|
const connectTools = availableTools
|
|
7
7
|
.filter((t) => t.operationType === "connect")
|
|
8
|
-
.sort((a, b) => a.category.localeCompare(b.category)); // Sort
|
|
8
|
+
.sort((a, b) => a.category.localeCompare(b.category)); // Sort Atlas tools before MongoDB tools
|
|
9
9
|
// Find the first Atlas connect tool if available and suggest to the LLM to use it.
|
|
10
10
|
// Note: if we ever have multiple Atlas connect tools, we may want to refine this logic to select the most appropriate one.
|
|
11
11
|
const atlasConnectTool = connectTools?.find((t) => t.category === "atlas");
|
package/dist/cjs/lib.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export { defaultUserConfig, type UserConfig } from "./common/config.js";
|
|
|
4
4
|
export { LoggerBase, type LogPayload, type LoggerType, type LogLevel } from "./common/logger.js";
|
|
5
5
|
export { StreamableHttpRunner } from "./transports/streamableHttp.js";
|
|
6
6
|
export { ConnectionManager, type AnyConnectionState, type ConnectionState, type ConnectionStateDisconnected, type ConnectionStateErrored, type ConnectionManagerFactoryFn, } from "./common/connectionManager.js";
|
|
7
|
+
export { type ConnectionErrorHandler } from "./common/connectionErrorHandler.js";
|
|
7
8
|
export { Telemetry } from "./telemetry/telemetry.js";
|
|
8
9
|
//# sourceMappingURL=lib.d.ts.map
|
package/dist/cjs/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACH,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACH,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/cjs/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":";;;AAAA,yCAAyD;AAAhD,mGAAA,MAAM,OAAA;AACf,kDAAmE;AAA1D,qGAAA,OAAO,OAAA;AAChB,gDAAwE;AAA/D,8GAAA,iBAAiB,OAAA;AAC1B,gDAAiG;AAAxF,uGAAA,UAAU,OAAA;AACnB,oEAAsE;AAA7D,yHAAA,oBAAoB,OAAA;AAC7B,sEAOuC;AANnC,yHAAA,iBAAiB,OAAA;
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":";;;AAAA,yCAAyD;AAAhD,mGAAA,MAAM,OAAA;AACf,kDAAmE;AAA1D,qGAAA,OAAO,OAAA;AAChB,gDAAwE;AAA/D,8GAAA,iBAAiB,OAAA;AAC1B,gDAAiG;AAAxF,uGAAA,UAAU,OAAA;AACnB,oEAAsE;AAA7D,yHAAA,oBAAoB,OAAA;AAC7B,sEAOuC;AANnC,yHAAA,iBAAiB,OAAA;AAQrB,yDAAqD;AAA5C,yGAAA,SAAS,OAAA"}
|
|
@@ -2,7 +2,7 @@ import { ErrorCodes } from "./errors.js";
|
|
|
2
2
|
export const connectionErrorHandler = (error, { availableTools, connectionState }) => {
|
|
3
3
|
const connectTools = availableTools
|
|
4
4
|
.filter((t) => t.operationType === "connect")
|
|
5
|
-
.sort((a, b) => a.category.localeCompare(b.category)); // Sort
|
|
5
|
+
.sort((a, b) => a.category.localeCompare(b.category)); // Sort Atlas tools before MongoDB tools
|
|
6
6
|
// Find the first Atlas connect tool if available and suggest to the LLM to use it.
|
|
7
7
|
// Note: if we ever have multiple Atlas connect tools, we may want to refine this logic to select the most appropriate one.
|
|
8
8
|
const atlasConnectTool = connectTools?.find((t) => t.category === "atlas");
|
package/dist/esm/lib.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export { defaultUserConfig, type UserConfig } from "./common/config.js";
|
|
|
4
4
|
export { LoggerBase, type LogPayload, type LoggerType, type LogLevel } from "./common/logger.js";
|
|
5
5
|
export { StreamableHttpRunner } from "./transports/streamableHttp.js";
|
|
6
6
|
export { ConnectionManager, type AnyConnectionState, type ConnectionState, type ConnectionStateDisconnected, type ConnectionStateErrored, type ConnectionManagerFactoryFn, } from "./common/connectionManager.js";
|
|
7
|
+
export { type ConnectionErrorHandler } from "./common/connectionErrorHandler.js";
|
|
7
8
|
export { Telemetry } from "./telemetry/telemetry.js";
|
|
8
9
|
//# sourceMappingURL=lib.d.ts.map
|
package/dist/esm/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACH,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACH,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/esm/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAuB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAmB,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAmD,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACH,iBAAiB,GAMpB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,EAAuB,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAmB,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAmD,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACH,iBAAiB,GAMpB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|