Table of Contents

Method GetResources

Namespace
LMKit.Mcp.Client
Assembly
LM-Kit.NET.dll

GetResources(CancellationToken)

Retrieves the list of resources offered by the server (synchronous wrapper). Results are cached after the first call until invalidation or a manual refresh.

public IReadOnlyCollection<McpResource> GetResources(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Optional cancellation token to cancel the operation.

Returns

IReadOnlyCollection<McpResource>

A read-only collection of McpResource values representing the server resources.

Exceptions

ObjectDisposedException

Thrown when the client has been disposed.

InvalidOperationException

Thrown when the server response is malformed.

HttpRequestException

Thrown when the HTTP request fails or the server returns an error.