Add utility function to server.ml.