Package org.machanism.machai.mcp.server
Class HttpStreamableMcpServer.HttpStreamableToolSpecificationBuilder
java.lang.Object
org.machanism.machai.mcp.server.HttpStreamableMcpServer.HttpStreamableToolSpecificationBuilder
- All Implemented Interfaces:
AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>
- Enclosing class:
HttpStreamableMcpServer
public class HttpStreamableMcpServer.HttpStreamableToolSpecificationBuilder
extends Object
implements AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecificationbuildSpecification(Object tool, BiFunction<io.modelcontextprotocol.server.McpSyncServerExchange, io.modelcontextprotocol.spec.McpSchema.CallToolRequest, io.modelcontextprotocol.spec.McpSchema.CallToolResult> callHandler) Builds aSyncToolSpecificationfor the Remote MCP server.
-
Constructor Details
-
HttpStreamableToolSpecificationBuilder
public HttpStreamableToolSpecificationBuilder()
-
-
Method Details
-
buildSpecification
public io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification buildSpecification(Object tool, BiFunction<io.modelcontextprotocol.server.McpSyncServerExchange, io.modelcontextprotocol.spec.McpSchema.CallToolRequest, io.modelcontextprotocol.spec.McpSchema.CallToolResult> callHandler) Builds aSyncToolSpecificationfor the Remote MCP server.- Specified by:
buildSpecificationin interfaceAbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>- Parameters:
tool- the tool object (should be aMcpSchema.Tool)callHandler- the handler function for tool invocation- Returns:
- a built
SyncToolSpecificationobject
-