A Magician's hat is required in order to buy Imp Invocation Scrolls.
The Imp Invocation Scroll is one of the scrolls bought from the Candy merchant in Candy Box. When used it activates a small Imp in front of you. This Imp has small amount of health and attacks enemies in front of you. If there is no room in front of you, the Imp will not appear. You can buy a Imp Invocation Scroll, with some luck, from the Candy Merchant for 400 Candies. It can also be used to Enchant a Sharp chocolate sword into a Sword of Summoning.