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
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
37
-
/// <returns>A task that represents the asynchronous operation. The task result contains the deserialized result.</returns>
38
-
[Obsolete($"Use {nameof(McpSession)}.{nameof(McpSession.SendRequestAsync)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
56
-
/// <returns>A task that represents the asynchronous send operation.</returns>
57
-
/// <remarks>
58
-
/// <para>
59
-
/// This method sends a notification without any parameters. Notifications are one-way messages
60
-
/// that don't expect a response. They are commonly used for events, status updates, or to signal
61
-
/// changes in state.
62
-
/// </para>
63
-
/// </remarks>
64
-
[Obsolete($"Use {nameof(McpSession)}.{nameof(McpSession.SendNotificationAsync)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
/// Sends a notification with parameters to the connected endpoint.
71
-
/// </summary>
72
-
/// <typeparam name="TParameters">The type of the notification parameters to serialize.</typeparam>
73
-
/// <param name="endpoint">The MCP client or server instance.</param>
74
-
/// <param name="method">The JSON-RPC method name for the notification.</param>
75
-
/// <param name="parameters">Object representing the notification parameters.</param>
76
-
/// <param name="serializerOptions">The options governing parameter serialization. If null, default options are used.</param>
77
-
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
78
-
/// <returns>A task that represents the asynchronous send operation.</returns>
79
-
/// <remarks>
80
-
/// <para>
81
-
/// This method sends a notification with parameters to the connected endpoint. Notifications are one-way
82
-
/// messages that don't expect a response, commonly used for events, status updates, or signaling changes.
83
-
/// </para>
84
-
/// <para>
85
-
/// The parameters object is serialized to JSON according to the provided serializer options or the default
86
-
/// options if none are specified.
87
-
/// </para>
88
-
/// <para>
89
-
/// The Model Context Protocol defines several standard notification methods in <see cref="NotificationMethods"/>,
90
-
/// but custom methods can also be used for application-specific notifications.
91
-
/// </para>
92
-
/// </remarks>
93
-
[Obsolete($"Use {nameof(McpSession)}.{nameof(McpSession.SendNotificationAsync)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
/// Notifies the connected endpoint of progress for a long-running operation.
105
-
/// </summary>
106
-
/// <param name="endpoint">The endpoint issuing the notification.</param>
107
-
/// <param name="progressToken">The <see cref="ProgressToken"/> identifying the operation for which progress is being reported.</param>
108
-
/// <param name="progress">The progress update to send, containing information such as percentage complete or status message.</param>
109
-
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
110
-
/// <returns>A task representing the completion of the notification operation (not the operation being tracked).</returns>
111
-
/// <exception cref="ArgumentNullException"><paramref name="endpoint"/> is <see langword="null"/>.</exception>
112
-
/// <remarks>
113
-
/// <para>
114
-
/// This method sends a progress notification to the connected endpoint using the Model Context Protocol's
115
-
/// standardized progress notification format. Progress updates are identified by a <see cref="ProgressToken"/>
116
-
/// that allows the recipient to correlate multiple updates with a specific long-running operation.
117
-
/// </para>
118
-
/// <para>
119
-
/// Progress notifications are sent asynchronously and don't block the operation from continuing.
120
-
/// </para>
121
-
/// </remarks>
122
-
[Obsolete($"Use {nameof(McpSession)}.{nameof(McpSession.NotifyProgressAsync)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
Copy file name to clipboardExpand all lines: src/ModelContextProtocol.Core/Protocol/ClientCapabilities.cs
-21Lines changed: 0 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -67,25 +67,4 @@ public sealed class ClientCapabilities
67
67
[JsonPropertyName("elicitation")]
68
68
publicElicitationCapability?Elicitation{get;set;}
69
69
70
-
/// <summary>Gets or sets notification handlers to register with the client.</summary>
71
-
/// <remarks>
72
-
/// <para>
73
-
/// When constructed, the client will enumerate these handlers once, which may contain multiple handlers per notification method key.
74
-
/// The client will not re-enumerate the sequence after initialization.
75
-
/// </para>
76
-
/// <para>
77
-
/// Notification handlers allow the client to respond to server-sent notifications for specific methods.
78
-
/// Each key in the collection is a notification method name, and each value is a callback that will be invoked
79
-
/// when a notification with that method is received.
80
-
/// </para>
81
-
/// <para>
82
-
/// Handlers provided via <see cref="NotificationHandlers"/> will be registered with the client for the lifetime of the client.
83
-
/// For transient handlers, <see cref="McpSession.RegisterNotificationHandler"/> may be used to register a handler that can
84
-
/// then be unregistered by disposing of the <see cref="IAsyncDisposable"/> returned from the method.
85
-
/// </para>
86
-
/// </remarks>
87
-
[JsonIgnore]
88
-
[Obsolete($"Use {nameof(McpClientOptions.Handlers.NotificationHandlers)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
/// Gets or sets the handler for completion requests.
33
-
/// </summary>
34
-
/// <remarks>
35
-
/// This handler provides auto-completion suggestions for prompt arguments or resource references in the Model Context Protocol.
36
-
/// The handler receives a reference type (e.g., "ref/prompt" or "ref/resource") and the current argument value,
37
-
/// and should return appropriate completion suggestions.
38
-
/// </remarks>
39
-
[JsonIgnore]
40
-
[Obsolete($"Use {nameof(McpServerOptions.Handlers.CompleteHandler)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
/// Gets or sets the handler for processing <see cref="RequestMethods.ElicitationCreate"/> requests.
28
-
/// </summary>
29
-
/// <remarks>
30
-
/// <para>
31
-
/// This handler function is called when an MCP server requests the client to provide additional
32
-
/// information during interactions. The client must set this property for the elicitation capability to work.
33
-
/// </para>
34
-
/// <para>
35
-
/// The handler receives message parameters and a cancellation token.
36
-
/// It should return a <see cref="ElicitResult"/> containing the response to the elicitation request.
37
-
/// </para>
38
-
/// </remarks>
39
-
[JsonIgnore]
40
-
[Obsolete($"Use {nameof(McpClientOptions.Handlers.ElicitationHandler)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
/// Gets or sets the handler for set logging level requests from clients.
25
-
/// </summary>
26
-
[JsonIgnore]
27
-
[Obsolete($"Use {nameof(McpServerOptions.Handlers.SetLoggingLevelHandler)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
Copy file name to clipboardExpand all lines: src/ModelContextProtocol.Core/Protocol/PromptsCapability.cs
-54Lines changed: 0 additions & 54 deletions
Original file line number
Diff line number
Diff line change
@@ -32,58 +32,4 @@ public sealed class PromptsCapability
32
32
[JsonPropertyName("listChanged")]
33
33
publicbool?ListChanged{get;set;}
34
34
35
-
/// <summary>
36
-
/// Gets or sets the handler for <see cref="RequestMethods.PromptsList"/> requests.
37
-
/// </summary>
38
-
/// <remarks>
39
-
/// This handler is invoked when a client requests a list of available prompts from the server
40
-
/// via a <see cref="RequestMethods.PromptsList"/> request. Results from this handler are returned
41
-
/// along with any prompts defined in <see cref="PromptCollection"/>.
42
-
/// </remarks>
43
-
[JsonIgnore]
44
-
[Obsolete($"Use {nameof(McpServerOptions.Handlers.ListPromptsHandler)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
/// Gets or sets the handler for <see cref="RequestMethods.PromptsGet"/> requests.
50
-
/// </summary>
51
-
/// <remarks>
52
-
/// <para>
53
-
/// This handler is invoked when a client requests details for a specific prompt by name and provides arguments
54
-
/// for the prompt if needed. The handler receives the request context containing the prompt name and any arguments,
55
-
/// and should return a <see cref="GetPromptResult"/> with the prompt messages and other details.
56
-
/// </para>
57
-
/// <para>
58
-
/// This handler will be invoked if the requested prompt name is not found in the <see cref="PromptCollection"/>,
59
-
/// allowing for dynamic prompt generation or retrieval from external sources.
60
-
/// </para>
61
-
/// </remarks>
62
-
[JsonIgnore]
63
-
[Obsolete($"Use {nameof(McpServerOptions.Handlers.GetPromptHandler)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
/// Gets or sets a collection of prompts that will be served by the server.
69
-
/// </summary>
70
-
/// <remarks>
71
-
/// <para>
72
-
/// The <see cref="PromptCollection"/> contains the predefined prompts that clients can request from the server.
73
-
/// This collection works in conjunction with <see cref="ListPromptsHandler"/> and <see cref="GetPromptHandler"/>
74
-
/// when those are provided:
75
-
/// </para>
76
-
/// <para>
77
-
/// - For <see cref="RequestMethods.PromptsList"/> requests: The server returns all prompts from this collection
78
-
/// plus any additional prompts provided by the <see cref="ListPromptsHandler"/> if it's set.
79
-
/// </para>
80
-
/// <para>
81
-
/// - For <see cref="RequestMethods.PromptsGet"/> requests: The server first checks this collection for the requested prompt.
82
-
/// If not found, it will invoke the <see cref="GetPromptHandler"/> as a fallback if one is set.
83
-
/// </para>
84
-
/// </remarks>
85
-
[JsonIgnore]
86
-
[Obsolete($"Use {nameof(McpServerOptions.PromptCollection)} instead. This member will be removed in a subsequent release.")]// See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
0 commit comments