When defining a user command, you can configure arguments to use userInput and choose the xpathOptions option. The xPathOptions takes an XPath which will be evaluated when users run the command from the Active Console. The XPath provided should end with a property, which may often be the name (e.g. /@name) or cell value (e.g. /@value).
Below is extracted from the documentation:
If the XPath provided is not correct, the command may show the message " Error: The path did not return variants [<Xpath>]"
For the XPath Editor, you can drag the Property box from the toolbar to the end of XPath, and then edit the box for the XPath property required. The XPath Editor will then show the text representation of the XPath.
For example, the XPath below indicates the name of all Managed Entities that are in Critical severity.
The right-click command would display the following dialog when it is selected.