Tool

References a drawing tool. At the moment this class is used only to get and set the active tool (app.tool), or to paint on the canvas (tool parameter in app.useTool()).

If a function receives a tool, it can receive a tool ID too.

Tool.id

local id = app.tool.id

Returns the identifier (a string) of the specified in the gui.xml file (example).