[enh] tools_upgrade() function