Interface McpResourcesAsToolsPresenter

All Known Implementing Classes:
DefaultMcpResourcesAsToolsPresenter

public interface McpResourcesAsToolsPresenter
A presenter that presents MCP resources (from one or more MCP clients) as tools to a chat model, allowing the chat model to discover and interact with resources. An implementation has to provide two tools, one for obtaining a list of resources, one for obtaining a particular resource. See DefaultMcpResourcesAsToolsPresenter for the default implementation.
  • Method Details

    • createListResourcesSpecification

      ToolSpecification createListResourcesSpecification()
      Create a specification for the tool that lists available resources.
    • createListResourcesExecutor

      ToolExecutor createListResourcesExecutor(List<McpClient> mcpClients)
      Create an executor for the tool that lists available resources.
    • createGetResourceSpecification

      ToolSpecification createGetResourceSpecification()
      Create a specification for the tool that gets a particular resource.
    • createGetResourceExecutor

      ToolExecutor createGetResourceExecutor(List<McpClient> mcpClients)
      Create an executor for the tool that gets a particular resource.