Did you had a look to Universal Robot UR+ developer section ? They have documented API with a developer forum. You should find further information.
I am not familiar with that with it looks like to make advance communication at the wrist you need to go through the development of a URCAP.
The following lines are extracted from UR swing developer manual:
Lately we've developed some more tooling on and around the UR. Usually when we use a custom made end of arm tool (EOAT) we run the cables over the arm back to the controller and connect them to the regular I/O's. However, I've noticed the Tool Communication Interface (TCI) option in the e-series. I've scoured through the manuals, but other than how to enable it and set the parameters through the dropdown menu's I haven't found anything.
Has someone used the TCI before to control a custom made EOAT, and is willing to share some knowledge? Or is there a tutorial for it, which I can follow? Any info would help!