You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After changing this to a request there was another problem when deserializing the params since it currently tries to map the above params directly to a LoggingLevel enum:
//Currently tries to map to thispublicenumLoggingLevel {// @formatter:off@JsonProperty("debug") DEBUG(0),
@JsonProperty("info") INFO(1)
//....
}
Would work when using Logging Level in a separate object as outlined in the official json schema:
// This would properly deserialize it@JsonIgnoreProperties(ignoreUnknown = true)
publicrecordSetLevelRequest(@JsonProperty("level") LoggingLevellevel) {
}
I have a working version ready and can provide a PR for fixing both issues shortly.
Environment
Java version: 17
MCP: 0.8.1
Steps to reproduce
Create a minimal MCP client with StdioTransport and setLoggingLevel. Create a minimal Stdio server that enables logging (See sample below).
Expected behavior
MCP Server should use the existing setLoggerRequestHandler and set the log level properly.
Minimal Complete Reproducible example
Create an MCP Client that leverages setLoggingLevel
Bug description
When using MCP Client with
setLogLevel
the Server can't find the suitable handler:According to the spec setLogLevel should be a request rather than a notification since it contains an id:
After changing this to a request there was another problem when deserializing the params since it currently tries to map the above params directly to a LoggingLevel enum:
Would work when using Logging Level in a separate object as outlined in the official json schema:
I have a working version ready and can provide a PR for fixing both issues shortly.
Environment
Java version: 17
MCP: 0.8.1
Steps to reproduce
Create a minimal MCP client with StdioTransport and setLoggingLevel. Create a minimal Stdio server that enables logging (See sample below).
Expected behavior
MCP Server should use the existing setLoggerRequestHandler and set the log level properly.
Minimal Complete Reproducible example
Create an MCP Client that leverages setLoggingLevel
Create an MCP Server with Logging enabled
The text was updated successfully, but these errors were encountered: