IMcpResourceClient
AgentPrism.Abstractions.dllThe client that lists and reads an MCP server’s resources.
public interface IMcpResourceClientRemarks
Section titled “Remarks”Capability checking is mandatory: if the server does not report
ServerCapabilities.Resources, the request is never sent.
Only declared URIs can be read. IMcpResourceClient.ReadResourceAsync
first compares against the set the server reported via
ListResourcesAsync; a URI not in that set is rejected with
McpOperationStatus.UriNotDeclared. Otherwise this would be an
SSRF tool.
Methods
Section titled “Methods”ListResourcesAsync(string, string, CancellationToken)
Section titled “ ListResourcesAsync(string, string, CancellationToken)”Fetches a server’s resource list.
ValueTask<McpResourceListResult> ListResourcesAsync(string tenantId, string serverName, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
serverName string
The server name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<McpResourceListResult>
ReadResourceAsync(string, string, string, CancellationToken)
Section titled “ ReadResourceAsync(string, string, string, CancellationToken)”Reads a resource.
ValueTask<(McpOperationStatus Status, McpResourceContent? Content)> ReadResourceAsync(string tenantId, string serverName, string uri, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
serverName string
The server name.
uri string
The URI of the resource to read; must be in the server’s declared set.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<(McpOperationStatus Status, McpResourceContent? Content)>