-
Notifications
You must be signed in to change notification settings - Fork 150
feat: adds support for dropping vector search indexes in drop-index tool MCP-239 #642
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
Merged
himanshusinghs
merged 21 commits into
main
from
feat/MCP-239-delete-vector-search-indexes
Oct 16, 2025
Merged
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8184f73
feat: introduces drop-search-index tool
himanshusinghs 1065ee8
chore: fix isError property placement with tests
himanshusinghs f26ae1a
chore: fix isError property on listSearchIndexes tool with tests
himanshusinghs 8960ffa
chore: remove redundant call
himanshusinghs eed4479
chore: remove unused import
himanshusinghs 52dc7c5
chore: addresses a few common concerns
himanshusinghs 746643b
chore: use Zod.string instead of CommonArgs.string
himanshusinghs 00f2212
chore: adapt test for new interface
himanshusinghs 716d9cb
chore: merge drop-search-index into drop-index tool
himanshusinghs 7d795ca
chore: use common logic from createIndex
himanshusinghs 7db2402
chore: replace with vi.waitFor
himanshusinghs 45b17b8
Merge remote-tracking branch 'origin/main' into feat/MCP-239-delete-v…
himanshusinghs 2add1f8
chore: remove search error handler class
himanshusinghs 122f062
chore: move isToolCategoryAvailable to Server
himanshusinghs 3e57858
chore: refactor helpers to use vi.waitFor
himanshusinghs d223098
chore: added a few more tests
himanshusinghs 97810c6
chore: accuracy tests for dropping indexes
himanshusinghs ab3ccae
Merge branch 'main' into feat/MCP-239-delete-vector-search-indexes
himanshusinghs 0817688
chore: replace another instance of provider with mongoclient
himanshusinghs ebe41fa
chore: make elicitation message more specific
himanshusinghs 9889955
Merge remote-tracking branch 'origin/main' into feat/MCP-239-delete-v…
himanshusinghs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; | ||
| import { type DbOperationArgs, MongoDBToolBase } from "../tools/mongodb/mongodbTool.js"; | ||
| import type { ToolArgs } from "../tools/tool.js"; | ||
|
|
||
| export abstract class MongoDBToolWithSearchErrorHandler extends MongoDBToolBase { | ||
| protected handleError( | ||
| error: unknown, | ||
| args: ToolArgs<typeof DbOperationArgs> | ||
| ): Promise<CallToolResult> | CallToolResult { | ||
| const CTA = this.server?.areLocalAtlasToolsAvailable() ? "`atlas-local` tools" : "Atlas CLI"; | ||
| if (error instanceof Error && "codeName" in error && error.codeName === "SearchNotEnabled") { | ||
| return { | ||
| content: [ | ||
| { | ||
| text: `The connected MongoDB deployment does not support vector search indexes. Either connect to a MongoDB Atlas cluster or use the ${CTA} to create and manage a local Atlas deployment.`, | ||
| type: "text", | ||
| }, | ||
| ], | ||
| isError: true, | ||
| }; | ||
| } | ||
| return super.handleError(error, args); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.