Class ClientResourceOperations
java.lang.Object
com.mulesoft.connectors.mcp.internal.client.operation.resource.ClientResourceOperations
@Throws({JsonRpcErrorTypeProvider.class,BasicOperationErrorTypeProvider.class,ResourceErrorTypeProvider.class})
public class ClientResourceOperations
extends Object
Client operations to manage resources hosted in a remote MCP server
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mule.runtime.extension.api.runtime.streaming.PagingProvider<io.modelcontextprotocol.client.McpAsyncClient,ResourceMetadata> Lists all the available resources in the remote MCP Serverorg.mule.runtime.extension.api.runtime.streaming.PagingProvider<io.modelcontextprotocol.client.McpAsyncClient,ResourceTemplateMetadata> Lists all the available resource templates in the target MCP clientvoidreadResource(io.modelcontextprotocol.client.McpAsyncClient client, String uri, RequestParameterGroup requestParameters, org.mule.runtime.extension.api.runtime.process.CompletionCallback<ResourceContent, Void> completionCallback) Reads a resource referenced by its URI
-
Constructor Details
-
ClientResourceOperations
public ClientResourceOperations()
-
-
Method Details
-
readResource
@DisplayName("MCP Client - Read Resource") public void readResource(@Connection io.modelcontextprotocol.client.McpAsyncClient client, @OfValues(ResourceUriValueProvider.class) String uri, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.runtime.extension.api.runtime.process.CompletionCallback<ResourceContent, Void> completionCallback) Reads a resource referenced by its URI- Parameters:
client- the MCP clienturi- A valid URIcompletionCallback- the completion callback
-
listResources
@DisplayName("MCP Client - List Resources") public org.mule.runtime.extension.api.runtime.streaming.PagingProvider<io.modelcontextprotocol.client.McpAsyncClient,ResourceMetadata> listResources()Lists all the available resources in the remote MCP Server -
listResourceTemplates
@Ignore public org.mule.runtime.extension.api.runtime.streaming.PagingProvider<io.modelcontextprotocol.client.McpAsyncClient,ResourceTemplateMetadata> listResourceTemplates()Lists all the available resource templates in the target MCP client
-