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 Summary
Modifier and TypeMethodDescriptioncreateGetResourceExecutor
(List<McpClient> mcpClients) Create an executor for the tool that gets a particular resource.Create a specification for the tool that gets a particular resource.createListResourcesExecutor
(List<McpClient> mcpClients) Create an executor for the tool that lists available resources.Create a specification for the tool that lists available resources.
-
Method Details
-
createListResourcesSpecification
ToolSpecification createListResourcesSpecification()Create a specification for the tool that lists available resources. -
createListResourcesExecutor
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
Create an executor for the tool that gets a particular resource.
-