Great question! So there’s a couple ways to problem solve this:
- For this specific case, you can use “Edit Source” on its parent menu. If you hover over the “Add” menu, right-click it, “Edit Source”, and pull up the Python file. Thankfully, the add mesh menu class is defined in there as well. But even if it’s not, the Add menu would still need the name for its layout, so it’s likely you would still see it.
- You can search “bpy.types” in the Python terminal. You can use the autocomplete to your advantage and press tab on “bpy.types.VIEW3D_MT_” and peruse the list to find a name. Submenus usually have similar names.
- You can also search add-ons online that have similar functionality, and see which menu class they reference.
- Lastly, you could search the source code at projects.blender.org/blender/blender (or its mirror repo on GitHub, which in my opinion has a better search engine). But since this is just for a Python class name, I rarely do this unless I just cannot find anything about it.
It’s not as ideal as with the tooltip on the main menus, but only a few more steps at most.