Builtin implementation for 'tree' action