Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mikekistler
Copy link
Contributor

Motivation and Context

This PR makes a small change to the test_tool_with_logging test, to set the logLevel before calling the tool.

Currently the test does not set the logLevel and expects the default logLevel lets through at least informational messages.
I think this assumption and not clearly required in the spec.

The current behavior of the C# SDK is that no log messages are sent unless the client sets the log level.

How Has This Been Tested?

Tested with a server built with the C# MCP SDK.

Breaking Changes

This should not affect any implementations currently passing the tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/conformance/@modelcontextprotocol/conformance@38

commit: c0046c3

@pcarleton
Copy link
Member

👍 makes sense, that's consistent with the flow chart in the spec:
https://modelcontextprotocol.io/specification/draft/server/utilities/logging

thanks for this change!

@pcarleton pcarleton enabled auto-merge (squash) November 20, 2025 11:43
@pcarleton pcarleton merged commit 3caf687 into modelcontextprotocol:main Nov 20, 2025
4 checks passed
@pcarleton
Copy link
Member

just saw this in the schema for log message:

If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.

more evidence this was a good change, if we required you setting a log level, we'd be bumping that MAY to a MUST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants