In Dynamics 365 Finance and Operation you can retrieve the list of all Menu Items (Display, Action or Output) through specific libraries.
These libraries are made in .NET and can be used both internally in Dynamics in X++ and externally (maybe to create some useful tools for Visual Studio).
Here is the link to the Microsoft documentation for these libraries: Ax Metadata API.
Here is the code snippet to retrieve all action type menu items:
//action
System.Type axMenuItemTypeAction = new Microsoft.Dynamics.AX.Metadata.MetaModel.AxMenuItemAction().GetType();
System.Collections.Specialized.StringEnumerator menuItemActionNames = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::MenuItemActionNames();
while (menuItemActionNames.moveNext())
{
str menuItemName = menuItemActionNames.get_current();
//Get Model Name for the display menu item
var enum = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::GetModelsOfMetadataArtifact(menuItemName, axMenuItemTypeAction).GetEnumerator();
str modelName = enum.moveNext() ? enum.Current.DisplayName : '';
MenuFunction menuFunction = new MenuFunction(menuItemName, MenuItemType::Action);
info(strFmt("menuItemName: %1, menuItemLabel: %2, modelName: %3", menuItemName, menuFunction.label(), modelName));
}