Class HttpStatelessMcpServer.HttpStatelessToolSpecificationBuilder

java.lang.Object
org.machanism.machai.mcp.server.HttpStatelessMcpServer.HttpStatelessToolSpecificationBuilder
All Implemented Interfaces:
AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.common.McpTransportContext>
Enclosing class:
HttpStatelessMcpServer

public class HttpStatelessMcpServer.HttpStatelessToolSpecificationBuilder extends Object implements AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.common.McpTransportContext>
  • Constructor Details

    • HttpStatelessToolSpecificationBuilder

      public HttpStatelessToolSpecificationBuilder()
  • Method Details

    • buildSpecification

      public io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncToolSpecification buildSpecification(Object tool, BiFunction<io.modelcontextprotocol.common.McpTransportContext,io.modelcontextprotocol.spec.McpSchema.CallToolRequest,io.modelcontextprotocol.spec.McpSchema.CallToolResult> callHandler)
      Builds a SyncToolSpecification for the Remote MCP server.
      Specified by:
      buildSpecification in interface AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.common.McpTransportContext>
      Parameters:
      tool - the tool object (should be a McpSchema.Tool)
      callHandler - the handler function for tool invocation
      Returns:
      a built SyncToolSpecification object