@@ -88,7 +88,7 @@ function setupForVectorSearchIndexes(integration: MongoDBIntegrationTestCase): {
8888describe . each ( [ { vectorSearchEnabled : false } , { vectorSearchEnabled : true } ] ) (
8989 "drop-index tool" ,
9090 ( { vectorSearchEnabled } ) => {
91- describe ( `when vector search is ${ vectorSearchEnabled ? "enabled" : "disabled" } ` , ( ) => {
91+ describe ( `when vector search feature flag is ${ vectorSearchEnabled ? "enabled" : "disabled" } ` , ( ) => {
9292 describeWithMongoDB (
9393 "tool metadata and parameters" ,
9494 ( integration ) => {
@@ -322,13 +322,13 @@ describe.each([{ vectorSearchEnabled: false }, { vectorSearchEnabled: true }])(
322322 it ( "should fail with appropriate error when invoked" , async ( ) => {
323323 await integration . connectMcpClient ( ) ;
324324 const response = await integration . mcpClient ( ) . callTool ( {
325- name : "drop-search- index" ,
326- arguments : { database : "any" , collection : "foo" , indexName : "default" } ,
325+ name : "drop-index" ,
326+ arguments : { database : "any" , collection : "foo" , indexName : "default" , type : "search" } ,
327327 } ) ;
328328 const content = getResponseContent ( response . content ) ;
329329 expect ( response . isError ) . toBe ( true ) ;
330- expect ( content ) . toEqual (
331- "This MongoDB cluster does not support Search Indexes. Make sure you are using an Atlas Cluster, either remotely in Atlas or using the Atlas Local image, or your cluster supports MongoDB Search. "
330+ expect ( content ) . toContain (
331+ "The connected MongoDB deployment does not support vector search indexes "
332332 ) ;
333333 } ) ;
334334 } ,
@@ -345,8 +345,13 @@ describe.each([{ vectorSearchEnabled: false }, { vectorSearchEnabled: true }])(
345345 describe ( "and attempting to delete a non-existent index" , ( ) => {
346346 it ( "should fail with appropriate error" , async ( ) => {
347347 const response = await integration . mcpClient ( ) . callTool ( {
348- name : "drop-search-index" ,
349- arguments : { database : "any" , collection : "foo" , indexName : "non-existent" } ,
348+ name : "drop-index" ,
349+ arguments : {
350+ database : "any" ,
351+ collection : "foo" ,
352+ indexName : "non-existent" ,
353+ type : "search" ,
354+ } ,
350355 } ) ;
351356 expect ( response . isError ) . toBe ( true ) ;
352357 const content = getResponseContent ( response . content ) ;
@@ -363,8 +368,13 @@ describe.each([{ vectorSearchEnabled: false }, { vectorSearchEnabled: true }])(
363368 describe ( "and attempting to delete an existing index" , ( ) => {
364369 it ( "should succeed in deleting the index" , { timeout : SEARCH_TIMEOUT } , async ( ) => {
365370 const response = await integration . mcpClient ( ) . callTool ( {
366- name : "drop-search-index" ,
367- arguments : { database : "mflix" , collection : "movies" , indexName : getIndexName ( ) } ,
371+ name : "drop-index" ,
372+ arguments : {
373+ database : "mflix" ,
374+ collection : "movies" ,
375+ indexName : getIndexName ( ) ,
376+ type : "search" ,
377+ } ,
368378 } ) ;
369379 const content = getResponseContent ( response . content ) ;
370380 expect ( content ) . toContain (
@@ -409,8 +419,13 @@ describe.each([{ vectorSearchEnabled: false }, { vectorSearchEnabled: true }])(
409419 it ( "should ask for confirmation before proceeding with tool call" , async ( ) => {
410420 mockElicitInput . confirmYes ( ) ;
411421 await integration . mcpClient ( ) . callTool ( {
412- name : "drop-search-index" ,
413- arguments : { database : "mflix" , collection : "movies" , indexName : getIndexName ( ) } ,
422+ name : "drop-index" ,
423+ arguments : {
424+ database : "mflix" ,
425+ collection : "movies" ,
426+ indexName : getIndexName ( ) ,
427+ type : "search" ,
428+ } ,
414429 } ) ;
415430 expect ( mockElicitInput . mock ) . toHaveBeenCalledTimes ( 1 ) ;
416431 expect ( mockElicitInput . mock ) . toHaveBeenCalledWith ( {
@@ -431,8 +446,13 @@ describe.each([{ vectorSearchEnabled: false }, { vectorSearchEnabled: true }])(
431446 it ( "should not drop the index if the confirmation was not provided" , async ( ) => {
432447 mockElicitInput . confirmNo ( ) ;
433448 await integration . mcpClient ( ) . callTool ( {
434- name : "drop-search-index" ,
435- arguments : { database : "mflix" , collection : "movies" , indexName : getIndexName ( ) } ,
449+ name : "drop-index" ,
450+ arguments : {
451+ database : "mflix" ,
452+ collection : "movies" ,
453+ indexName : getIndexName ( ) ,
454+ type : "search" ,
455+ } ,
436456 } ) ;
437457 expect ( mockElicitInput . mock ) . toHaveBeenCalledTimes ( 1 ) ;
438458 expect ( mockElicitInput . mock ) . toHaveBeenCalledWith ( {
@@ -446,6 +466,7 @@ describe.each([{ vectorSearchEnabled: false }, { vectorSearchEnabled: true }])(
446466 } ) ;
447467 } ,
448468 {
469+ getUserConfig : ( ) => ( { ...defaultTestConfig , voyageApiKey : "test-api-key" } ) ,
449470 downloadOptions : { search : true } ,
450471 getMockElicitationInput : ( ) => mockElicitInput ,
451472 }
0 commit comments