Interface IMcpResourceProvider
Supplies the resources an McpServer exposes through resources/list,
resources/templates/list and resources/read.
public interface IMcpResourceProvider
Remarks
Resources are how a server hands back payloads that must not enter the caller's context unbidden: a converted document, a rendered page, a produced artifact. A tool returns a link, the caller reads it only when it needs the bytes.
Methods
- ListResourceTemplatesAsync(McpRequestContext, CancellationToken)
Lists the URI templates the caller may instantiate, for resource families whose members cannot be enumerated ahead of time.
- ListResourcesAsync(McpRequestContext, CancellationToken)
Lists the concrete resources currently available to the caller.
- ReadResourceAsync(string, McpRequestContext, CancellationToken)
Reads a resource by URI.