Method ReadResourceAsync
ReadResourceAsync(string, McpRequestContext, CancellationToken)
Reads a resource by URI.
Task<McpResourceContent> ReadResourceAsync(string uri, McpRequestContext context, CancellationToken cancellationToken = default)
Parameters
uristringThe URI to read.
contextMcpRequestContextSession and caller identity, used to authorize the read.
cancellationTokenCancellationTokenA token to observe while reading.
Returns
- Task<McpResourceContent>
The contents, or
nullwhen this provider does not own the URI, which lets the server try the next registered provider.