Class AsyncMcpPromptProvider

java.lang.Object
org.springaicommunity.mcp.provider.prompt.AsyncMcpPromptProvider

public class AsyncMcpPromptProvider extends Object
Provider for asynchronous MCP prompt methods. This provider creates prompt specifications for methods annotated with McpPrompt that return reactive types and work with McpAsyncServerExchange.
Author:
Christian Tzolov
  • Constructor Details

    • AsyncMcpPromptProvider

      public AsyncMcpPromptProvider(List<Object> promptObjects)
      Create a new AsyncMcpPromptProvider.
      Parameters:
      promptObjects - the objects containing methods annotated with McpPrompt
  • Method Details

    • getPromptSpecifications

      public List<io.modelcontextprotocol.server.McpServerFeatures.AsyncPromptSpecification> getPromptSpecifications()
      Get the async prompt specifications.
      Returns:
      the list of async prompt specifications
    • doGetClassMethods

      protected Method[] doGetClassMethods(Object bean)
      Returns the methods of the given bean class.
      Parameters:
      bean - the bean instance
      Returns:
      the methods of the bean class