I'd like to be able to inspect a history from within a tool, but I don't see an easy way to determine which history a tool is running from. Is there a variable I don't know about that contains the history id?
Alternatively, is there a way to get a database connection to ferret around for these details?