Many people have overriden the context menu specifically. I would look at some examples from Heed's and/or KEMO's PC tools or from Kaldor's context menu implementation of M. Rieder's selective transparency for PCs.
One of the most annoying things about XML files for NWN2 is that any error will completely prevent the GUI from working. I had talked a while ago with Zebransky about whether it would be possible to create a system that gives you feedback on which line the error is on, but that never really went anywhere.
Grinning Fool also has a
reference set up of all the available functions. There aren't any comments in this resource, so it's sometimes hard to make sense of.
Also be aware that there are other ways to access some things on the context menu. Active skills such as Sleight of Hand, Heal, Taunt, etc. can be dragged to the quick bars.
I know that overriding pickpocket behavior is something that has been done through NWNX. Maybe it's time to check in with Pain about the progress for making NWNX4 work seamlessly for single-player?