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
Copy file name to clipboardExpand all lines: src/common/config.ts
+23-4Lines changed: 23 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -319,7 +319,7 @@ export function warnAboutDeprecatedOrUnknownCliArgs(
319
319
if(knownArgs.connectionString){
320
320
usedDeprecatedArgument=true;
321
321
warn(
322
-
"The --connectionString argument is deprecated. Prefer using the MDB_MCP_CONNECTION_STRING environment variable or the first positional argument for the connection string."
322
+
"Warning: The --connectionString argument is deprecated. Prefer using the MDB_MCP_CONNECTION_STRING environment variable or the first positional argument for the connection string."
323
323
);
324
324
}
325
325
@@ -333,15 +333,15 @@ export function warnAboutDeprecatedOrUnknownCliArgs(
333
333
if(!valid){
334
334
usedInvalidArgument=true;
335
335
if(suggestion){
336
-
warn(`Invalid command line argument '${providedKey}'. Did you mean '${suggestion}'?`);
336
+
warn(`Warning: Invalid command line argument '${providedKey}'. Did you mean '${suggestion}'?`);
337
337
}else{
338
-
warn(`Invalid command line argument '${providedKey}'.`);
338
+
warn(`Warning: Invalid command line argument '${providedKey}'.`);
339
339
}
340
340
}
341
341
}
342
342
343
343
if(usedInvalidArgument||usedDeprecatedArgument){
344
-
warn("Refer to https://www.mongodb.com/docs/mcp-server/get-started/ for setting up the MCP Server.");
344
+
warn("- Refer to https://www.mongodb.com/docs/mcp-server/get-started/ for setting up the MCP Server.");
345
345
}
346
346
347
347
if(usedInvalidArgument){
@@ -372,6 +372,24 @@ export function registerKnownSecretsInRootKeychain(userConfig: Partial<UserConfi
Warning: An embeddings provider is configured but the 'vectorSearch' preview feature is not enabled.
388
+
- Enable vector search by adding 'vectorSearch' to the 'previewFeatures' configuration option, or remove the embeddings provider configuration if not needed.\
Copy file name to clipboardExpand all lines: src/tools/mongodb/create/createIndex.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ export class CreateIndexTool extends MongoDBToolBase {
80
80
])
81
81
)
82
82
.describe(
83
-
"The index definition. Use 'classic' for standard indexesand 'vectorSearch' for vector search indexes"
83
+
`The index definition. Use 'classic' for standard indexes${this.isFeatureEnabled("vectorSearch") ? " and 'vectorSearch' for vector search indexes" : ""}.`
\`$vectorSearch\` **MUST** be the first stage of the pipeline, or the first stage of a \`$unionWith\` subpipeline.
25
24
### Usage Rules for \`$vectorSearch\`
26
-
- **Unset embeddings:**
25
+
- **Unset embeddings:**
27
26
Unless the user explicitly requests the embeddings, add an \`$unset\` stage **at the end of the pipeline** to remove the embedding field and avoid context limits. **The $unset stage in this situation is mandatory**.
28
27
- **Pre-filtering:**
29
28
If the user requests additional filtering, include filters in \`$vectorSearch.filter\` only for pre-filter fields in the vector index.
@@ -32,20 +31,28 @@ If the user requests additional filtering, include filters in \`$vectorSearch.fi
32
31
For all remaining filters, add a $match stage after $vectorSearch.
33
32
### Note to LLM
34
33
- If unsure which fields are filterable, use the collection-indexes tool to determine valid prefilter fields.
35
-
- If no requested filters are valid prefilters, omit the filter key from $vectorSearch.`
0 commit comments