Table of Contents

Class ResourcesCapability

Namespace
ModelContextProtocol.Protocol.Types
Assembly
ModelContextProtocol.dll

Represents the resources capability configuration. See the schema for details

public class ResourcesCapability
Inheritance
ResourcesCapability
Inherited Members

Properties

ListChanged

Whether this server supports notifications for changes to the resource list.

[JsonPropertyName("listChanged")]
public bool? ListChanged { get; set; }

Property Value

bool?

ListResourceTemplatesHandler

Gets or sets the handler for list resource templates requests.

[JsonIgnore]
public Func<RequestContext<ListResourceTemplatesRequestParams>, CancellationToken, Task<ListResourceTemplatesResult>>? ListResourceTemplatesHandler { get; set; }

Property Value

Func<RequestContext<ListResourceTemplatesRequestParams>, CancellationToken, Task<ListResourceTemplatesResult>>

ListResourcesHandler

Gets or sets the handler for list resources requests.

[JsonIgnore]
public Func<RequestContext<ListResourcesRequestParams>, CancellationToken, Task<ListResourcesResult>>? ListResourcesHandler { get; set; }

Property Value

Func<RequestContext<ListResourcesRequestParams>, CancellationToken, Task<ListResourcesResult>>

ReadResourceHandler

Gets or sets the handler for read resources requests.

[JsonIgnore]
public Func<RequestContext<ReadResourceRequestParams>, CancellationToken, Task<ReadResourceResult>>? ReadResourceHandler { get; set; }

Property Value

Func<RequestContext<ReadResourceRequestParams>, CancellationToken, Task<ReadResourceResult>>

Subscribe

Whether this server supports subscribing to resource updates.

[JsonPropertyName("subscribe")]
public bool? Subscribe { get; set; }

Property Value

bool?

SubscribeToResourcesHandler

Gets or sets the handler for subscribe to resources messages.

[JsonIgnore]
public Func<RequestContext<SubscribeRequestParams>, CancellationToken, Task<EmptyResult>>? SubscribeToResourcesHandler { get; set; }

Property Value

Func<RequestContext<SubscribeRequestParams>, CancellationToken, Task<EmptyResult>>

UnsubscribeFromResourcesHandler

Gets or sets the handler for unsubscribe from resources messages.

[JsonIgnore]
public Func<RequestContext<UnsubscribeRequestParams>, CancellationToken, Task<EmptyResult>>? UnsubscribeFromResourcesHandler { get; set; }

Property Value

Func<RequestContext<UnsubscribeRequestParams>, CancellationToken, Task<EmptyResult>>