-
Notifications
You must be signed in to change notification settings - Fork 141
feat: add ability to create vector search indexes MCP-234 MCP-243 #621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
Pull Request Test Coverage Report for Build 18482155309Details
💛 - Coveralls |
4113579
to
69aa6d0
Compare
This comment has been minimized.
This comment has been minimized.
📊 Accuracy Test Results📈 Summary
📊 Baseline Comparison
📎 Download Full HTML Report - Look for the Report generated on: 10/14/2025, 10:36:40 AM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds vector search index creation capability to the existing create-index
tool, allowing users to create both classic MongoDB indexes and vector search indexes through the MCP server.
- Extends the
create-index
tool to support vector search indexes alongside existing classic indexes - Refactors the tool's API to use a definition array with discriminated union types for different index types
- Adds comprehensive test coverage for the new vector search functionality
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/tools/mongodb/create/createIndex.ts |
Core implementation adding vector search index support with feature flag gating |
src/tools/tool.ts |
Adds feature flag infrastructure for vector search functionality |
tests/integration/tools/mongodb/create/createIndex.test.ts |
Extensive test coverage for both classic and vector search index creation |
tests/integration/tools/mongodb/mongodbHelpers.ts |
Moves shared search helper functions from individual test files |
tests/integration/tools/mongodb/search/listSearchIndexes.test.ts |
Refactors to use centralized helper functions |
tests/integration/helpers.ts |
Updates parameter validation to handle discriminated union schemas |
tests/accuracy/createIndex.test.ts |
Updates accuracy tests with new API and adds vector search test cases |
tests/accuracy/dropIndex.test.ts |
Updates to use new definition array format |
tests/accuracy/sdk/describeAccuracyTests.ts |
Adds voyage API key parameter support |
tests/accuracy/sdk/accuracyTestingClient.ts |
Adds voyage API key to client initialization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 🚀 I have left small suggestions.
const isVectorSearchSupported = await this.session.isConnectedToMongot; | ||
if (!isVectorSearchSupported) { | ||
// TODO: remove hacky casts once we merge the local dev tools | ||
const isLocalAtlasAvailable = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are checking if a tool exists in a few places already in other places, maybe we can extract this to a function and refactor?
Proposed changes
This adds the ability to create a vector search index to the
create-index
tool. This is a consolidated tool that's using a discriminated union definition when deciding what type of index to create.For the initial release, we're feature-flagging the search capabilities, so only adding the vector search option to the union in case the feature flag is enabled, but that will be dropped in the future. We're not updating the definition regardless of whether we're connected to atlas search capable server or not.