Class SyncStatelessMcpCompleteProvider

java.lang.Object
org.springaicommunity.mcp.provider.complete.SyncStatelessMcpCompleteProvider

public class SyncStatelessMcpCompleteProvider extends Object
Provider for synchronous stateless MCP complete methods. This provider creates completion specifications for methods annotated with McpComplete that are designed to work in a stateless manner using McpTransportContext.
Author:
Christian Tzolov
  • Constructor Details

    • SyncStatelessMcpCompleteProvider

      public SyncStatelessMcpCompleteProvider(List<Object> completeObjects)
      Create a new SyncStatelessMcpCompleteProvider.
      Parameters:
      completeObjects - the objects containing methods annotated with McpComplete
  • Method Details

    • getCompleteSpecifications

      public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncCompletionSpecification> getCompleteSpecifications()
      Get the stateless completion specifications.
      Returns:
      the list of stateless completion 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