def expose(command=None, add_client=False):
    """
    Decorator to expose a function. If add_client is True, the client
    object will be added to the command list as first argument.
    """
    def decorator(func):
        func._toolkit_rpc = command or func.__name__
        func._toolkit_rpc_param = (add_client,)
        return func
    return decorator