- Namespace
- ModelContextProtocol.Client
- Assembly
- ModelContextProtocol.Core.dll
Provides a container for handlers used in the creation of an MCP client.
public sealed class McpClientHandlers
- Inheritance
-
McpClientHandlers
- Inherited Members
Remarks
Properties
ElicitationHandler
public Func<ElicitRequestParams?, CancellationToken, ValueTask<ElicitResult>>? ElicitationHandler { get; set; }
Property Value
Remarks
NotificationHandlers
Gets or sets notification handlers to register with the client.
public IEnumerable<KeyValuePair<string, Func<JsonRpcNotification, CancellationToken, ValueTask>>>? NotificationHandlers { get; set; }
Property Value
Remarks
RootsHandler
Gets or sets the handler for RootsList requests.
public Func<ListRootsRequestParams?, CancellationToken, ValueTask<ListRootsResult>>? RootsHandler { get; set; }
Property Value
Remarks
SamplingHandler
public Func<CreateMessageRequestParams?, IProgress<ProgressNotificationValue>, CancellationToken, ValueTask<CreateMessageResult>>? SamplingHandler { get; set; }
Property Value
- Func<CreateMessageRequestParams, IProgress<ProgressNotificationValue>, CancellationToken, ValueTask<CreateMessageResult>>
Remarks
TaskStatusHandler
[Experimental("MCPEXP001", UrlFormat = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#mcpexp001")]
public Func<McpTask, CancellationToken, ValueTask>? TaskStatusHandler { get; set; }