Table of Contents

Class SubscribeRequestParams

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents the parameters used with a ResourcesSubscribe request from a client to request real-time notifications from the server whenever a particular resource changes.

public class SubscribeRequestParams : RequestParams
Inheritance
SubscribeRequestParams
Inherited Members

Remarks

The subscription mechanism allows clients to be notified about changes to specific resources identified by their URI. When a subscribed resource changes, the server sends a notification to the client with the updated resource information.

Subscriptions remain active until explicitly canceled using UnsubscribeRequestParams or until the connection is terminated.

The server may refuse or limit subscriptions based on its capabilities or resource constraints.

Properties

Uri

Gets or sets the URI of the resource to subscribe to.

[JsonPropertyName("uri")]
public string? Uri { get; init; }

Property Value

string

Remarks

The URI can use any protocol; it is up to the server how to interpret it.