Fix api.js auto object initialization
(was never tested, was totally borked)
Add tools list API wrapper to api.js