The Pied Piper's magic - Kellogg, Steven (Dial Books for Young Readers, 2009)
In a story loosely based on The Pied Piper of Hamelin, an elf acquires from a miserable witch a magic pipe that allows him to transform things, including the mean-spirited Grand Duke who rules over a rat-infested town.