Richard, et al,
Many grob properties are given a function (like tuplet-number::calc-direction) rather than a static value (like UP) when the property depends on many factors. In other words, by default, it's as if the 'direction property was set with
\override TupletNumber.direction = #tuplet-number::calc-direction
This function accepts a TupletNumber grob object which is able to provide the information needed for tuplet-number::calc-direction to determine if the value should be UP, DOWN, CENTER, or even something else (like with kneed beams). So, by putting in one of those output values, like