How to access shell script return value in hazel

I read the shell script docs. I see that the $1 is passed to a script as the filename that caused the Hazel rule to be executed. However I cannot find any information on how the output (stdout perhaps?) can be read or used by the Hazel rule. How does that work?