There is already a suggestion that is similar, if you are carrying a paddle or sesta and are trying to move a punt or raft over water then you automatically equip the tool.
IIRC, the suggestion was to make the character use a near paddle/sesta in a similar way that currently, a near tool is used when needed.
Well he asked what are the actions, subject is “technical question” and this is gameplay questions board, not suggestions.
It might be worth a suggestion, but might need more refining before posting the suggestion: how would two-handed be treated, with a tool or with shield or existing weapon, what if the other weapon is one handed throwing weapon like rock or javelin. Should it be placed in inventory, other hand or dropped? Automatic actions sometimes make things more complicated.
It can be done without overcomplicating things, e.g.: pressing [w]ield instead of [Enter]>[Space] when selecting which item is taken (both, from the ground or a burden animal). In case that both hands are occupied, a prompt telling the player that needs to free a hand [d]ropping or [T]aking out something is shown.