Class AsyncStatelessMcpToolProvider

java.lang.Object
org.springaicommunity.mcp.provider.tool.AbstractMcpToolProvider
org.springaicommunity.mcp.provider.tool.AsyncStatelessMcpToolProvider

public class AsyncStatelessMcpToolProvider extends AbstractMcpToolProvider
Provider for asynchronous stateless MCP tool methods. This provider creates tool specifications for methods annotated with McpTool that are designed to work in a stateless manner using McpTransportContext and return reactive types.
Author:
Christian Tzolov
  • Constructor Details

    • AsyncStatelessMcpToolProvider

      public AsyncStatelessMcpToolProvider(List<Object> toolObjects)
      Create a new AsyncStatelessMcpToolProvider.
      Parameters:
      toolObjects - the objects containing methods annotated with McpTool
  • Method Details

    • getToolSpecifications

      public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncToolSpecification> getToolSpecifications()
      Get the async stateless tool specifications.
      Returns:
      the list of async stateless tool specifications