The MongoDB driver supports a number of functions that you can use in expressions, as listed and described in "Supported scalar functions."