Eneroth Tool Memory is a SketchUp extension that lists the last few active SketchUp tools and lets the user cycle them for quick activation.
Eneroth Tool Memory utilizes this public API to let other extensions interact with it. For details see api.rb. For a practical example, see Eneroth Scaled Tape Measure.
Please note that Eneroth Tool Memory only lists actual Tools, not actions or commands.