I have an example of using a function in a probe here:
viewtopic.php?t=192103&hilit=probe
It does not use not function parameters, however. I just created multiple functions rather than take an argument. Reason being is I'm not 100% on how to correctly use arguments. $1 etc should work, but the syntax gets wonky and undocumented so I didn't try further... but $1 $2 is AFAIK how you do it.
Maybe someone else can chime in, since without a bunch of trial-and-error, IDK....