forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnsubscribeRequestParams.cs
More file actions
27 lines (25 loc) · 1.06 KB
/
UnsubscribeRequestParams.cs
File metadata and controls
27 lines (25 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Sent from the client to cancel resource update notifications from the server for a specific resource.
/// </summary>
/// <remarks>
/// <para>
/// After a client has subscribed to resource updates using <see cref="SubscribeRequestParams"/>,
/// this message can be sent to stop receiving notifications for a specific resource.
/// This is useful for conserving resources and network bandwidth when
/// the client no longer needs to track changes to a particular resource.
/// </para>
/// <para>
/// The unsubscribe operation is idempotent, meaning it can be called multiple times
/// for the same resource without causing errors, even if there is no active subscription.
/// </para>
/// </remarks>
public class UnsubscribeRequestParams : RequestParams
{
/// <summary>
/// The URI of the resource to unsubscribe from. The URI can use any protocol; it is up to the server how to interpret it.
/// </summary>
[JsonPropertyName("uri")]
public string? Uri { get; init; }
}