Package org.machanism.machai.mcp.server
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.modelcontextprotocol.server.McpStatelessServerFeatures.SyncToolSpecificationbuildSpecification(Object tool, BiFunction<io.modelcontextprotocol.common.McpTransportContext, io.modelcontextprotocol.spec.McpSchema.CallToolRequest, io.modelcontextprotocol.spec.McpSchema.CallToolResult> callHandler) Builds aSyncToolSpecificationfor the Remote MCP server.
-
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 aSyncToolSpecificationfor the Remote MCP server.- Specified by:
buildSpecificationin interfaceAbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.common.McpTransportContext>- Parameters:
tool- the tool object (should be aMcpSchema.Tool)callHandler- the handler function for tool invocation- Returns:
- a built
SyncToolSpecificationobject
-