Draft
Conversation
- Modified ToolsController to accept preferences and pass maxTimeMS - Updated provider to inject getMaxTimeMS function from preferences - Patched mongodb-mcp-server to read maxTimeMS from requestInfo.headers - Applied maxTimeMS to find and aggregate operations - Upgraded mongodb-mcp-server to 1.7.0 - Added postinstall script to apply patches automatically - All tests passing
Contributor
|
Cursor Agent can help with this pull request. Just |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat(assistant): apply maxTimeMS to database tools COMPASS-10235
Description
This PR ensures that database tools invoked by the assistant respect the
maxTimeMSsetting configured in Compass.The
ToolsControllernow retrieves themaxTimeMSfrom Compass preferences and passes it via thex-compass-maxtimemsheader during tool invocation. To enable themongodb-mcp-serverto utilize this, the package has been upgraded to1.7.0and patched. The patch modifies thefindandaggregatetools within the MCP server to read and apply themaxTimeMSvalue from therequestInfo.headers. Apostinstallscript has been added to automatically apply this patch.Checklist
Motivation and Context
This change is required to prevent long-running operations initiated by the assistant's database tools. By applying the default or configured
maxTimeMSfrom Compass, we align the assistant's behavior with the rest of Compass/DE, improving user experience and preventing unintended resource consumption.Open Questions
None.
Dependents
None.
Types of changes