Recently, I needed to build a custom tool for the Arduino IDE. I discovered that, at least in 1.6.5, the Mangler demo code didn't build at all, nor did it produce a useable tool. After some hacking, I got a tool skeleton working. I've put it in a git repository, in case anyone else needs such a thing.
It's kind of a stop-gap though. I'd like to suggest that the example code be maintained in working order for adding tools.
-JRS