tool_operate: Moved required argument getting into separate function