A wooden flute is a musical instrument. It can be used to play notes to guess the passtune. Improvising with it will exercise your dexterity. Also, if the player has enough experience and dexterity, improvising with it will make nearby snakes peaceful. When played, it will either "trill" (which pacifies snakes) or "toot."
The snake-charming effect will occur if (1dDex + Xlvl) is 27 or greater.