Add ModelContextProtocol.Core package (#428)
This commit is contained in:
parent
57458241b9
commit
703b0fe50b
1 changed files with 239 additions and 94 deletions
22
src/ModelContextProtocol.Core/Protocol/LoggingCapability.cs
Normal file
22
src/ModelContextProtocol.Core/Protocol/LoggingCapability.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using ModelContextProtocol.Server;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.Protocol;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the logging capability configuration for a Model Context Protocol server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This capability allows clients to set the logging level and receive log messages from the server.
|
||||
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
|
||||
/// </remarks>
|
||||
public class LoggingCapability
|
||||
{
|
||||
// Currently empty in the spec, but may be extended in the future
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the handler for set logging level requests from clients.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Func<RequestContext<SetLevelRequestParams>, CancellationToken, ValueTask<EmptyResult>>? SetLoggingLevelHandler { get; set; }
|
||||
}
|
||||
Loading…
Reference in a new issue