Method SetLogLevelAsync
SetLogLevelAsync(McpLogLevel, CancellationToken)
Sets the minimum log level for server-side logging. The server will only send log messages at or above this level.
public Task SetLogLevelAsync(McpLogLevel level, CancellationToken cancellationToken = default)
Parameters
levelMcpLogLevelThe minimum log level to receive.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
Exceptions
- ObjectDisposedException
Thrown if the client has been disposed.
- InvalidOperationException
Thrown if the server does not support logging.