Class StdioMcpServer.StdioToolSpecificationBuilder

java.lang.Object
org.machanism.machai.mcp.server.StdioMcpServer.StdioToolSpecificationBuilder
All Implemented Interfaces:
AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>
Enclosing class:
StdioMcpServer

public class StdioMcpServer.StdioToolSpecificationBuilder extends Object implements AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>
  • Constructor Details

    • StdioToolSpecificationBuilder

      public StdioToolSpecificationBuilder()
  • 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 a SyncToolSpecification for the STDIO MCP server.
      Specified by:
      buildSpecification in interface AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange>
      Parameters:
      tool - the tool object (should be a McpSchema.Tool)
      callHandler - the handler function for tool invocation
      Returns:
      a built SyncToolSpecification object