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.
Automatic handling of logging level #882
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
Uh oh!
There was an error while loading. Please reload this page.
Automatic handling of logging level #882
Changes from 1 commit
a0e03b28f3e203e811cd9657f6d7184ce5adf02c0f576a853File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
* In src/server/index.ts - in Server class constructor when setting request handler for SetLevelRequestSchema - take the sessionId OR 'mcp-session-id' header and store the session id in the _loggingLevels map by session id. Doesn't store the level if there is no session id - change _logLevel variable to a Map, string to LoggingLevel type - rename _msgLevels array to _levelNames and just make it strings for simplicity - in isMessageIgnored function - take a sessionId argument - change _msgLevels to _levelNames - match against the level stored in the _loggingLevels map by session id - in sendLoggingLevelMessage, - add optional sessionId argument - make all action conditional upon _capabilities.logging existing - if there is no session id OR if the message is not ignored based on the level and session id, send the notification * In src/server/mcp.ts - in sendLoggingMessage - add optional sessionId argument - pass sessionId to server.sendLoggingMessage * In src/examples/server - jsonResponseStreamableHttp.ts - simpleSseServer.ts - simpleStatelessStreamableHttp.ts - simpleStreamableHttp.ts - sseAndStreamableHttpCompatibleServer.ts - update tool callbacks to get the extra param - update erver.sendLoggingMessage calls to include extra.sessionIdUh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing