Repository navigation
fix(mcp): Mongo maxTimeMS and a total response size cap (#1776) - #1808
Merged
Merged
Conversation
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.
Closes #1776 (the rest of it; the socket host, controller, access store and guard items went in #1802).
findsendsmaxTimeMS(the MCP timeout) with the find command,countaddsmaxTimeMSto the count command. The server now stops a heavy$regexor$expritself; before, the Dart future was dropped and the session closed, but the query could keep running. The find command needs MongoDB 3.6+ (OP_MSG); older servers get the plain find as before.McpMongoService.maxTotalChars(200000): the documents of a result together, as JSON, are capped; more are cut and the result is markedtruncated. Each field was already capped at 4096 characters, but 100 documents of many such fields were not.Not done: masking the connection's own secrets for non-tool exceptions in
_guarded; the redaction by pattern (URL user info,password=, keys) still applies there. Not run locally (the analyzer is clean on the changed files), CI will run the tests.