In the preferences tab, you can enable a pre Library Add script. This script, when an item is being dragged into the library. This could for example be used to add an entry into a database, or making sure a file reference is in the correct location within houdini, before then adding it to the library.
A Variable containing an array of the nodes to be added to the library is available:
hou.session.ODAssetLibNodesToAdd
Sample Script (saved as prelibaddscript.py) It simply prints the file thats about to be added to the library.
print("We are adding the following nodes to the library", hou.session.ODAssetLibNodesToAdd)