Scripting interface for ContextMenu Command

Is there a way to get via scripting the same data that is seen when using ContextMenu ShowCmds?

If not, could you consider including one?

Thanks.