-
Notifications
You must be signed in to change notification settings - Fork 139
feat: introduces drop-index tool for regular index #644
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
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
Introduces a new drop-index
tool for MongoDB that allows users to drop regular indexes from collections, categorized as a delete operation requiring user confirmation.
- Adds a new MongoDB tool for dropping indexes with proper validation and elicitation
- Implements comprehensive integration tests covering success and error scenarios
- Configures the tool to require user confirmation before execution
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/tools/mongodb/delete/dropIndex.ts | New tool implementation for dropping MongoDB indexes |
src/tools/mongodb/tools.ts | Registers the new DropIndexTool in the MongoDB tools array |
src/common/config.ts | Adds drop-index to the list of tools requiring confirmation |
tests/integration/tools/mongodb/delete/dropIndex.test.ts | Comprehensive integration tests for the drop-index functionality |
b3d669a
to
e0a7780
Compare
📊 Accuracy Test Results📈 Summary
📊 Baseline Comparison
📎 Download Full HTML Report - Look for the Report generated on: 10/13/2025, 9:16:41 PM |
protected description = "Drop an index for the provided database and collection."; | ||
protected argsShape = { | ||
...DbOperationArgs, | ||
indexName: CommonArgs.string().nonempty().describe("The name of the index to be dropped."), |
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.
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.
Interesting. Just noticed that rest of the tools don't enforce these checks. I do wonder though how practical are such index names?
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.
Removed the unicode check
1. The tool has been marked to require user confirmation before execution. 2. Tests are added to confirm the negative and positive behaviour
2593cc0
to
a6ba8ff
Compare
Pull Request Test Coverage Report for Build 18492324576Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Proposed changes
Adds a drop-index tool categorised under delete operation and marked as one requiring elicitation.
Checklist