Make a Pie-Specials Menu, dependent on selection type
In blenders text editor you can find a template for creating a pie menu. You will probably want to turn your script into an addon to make your menu available every time you start blender.

Starting with the pie template, you want to alter the menus draw() to work how you want.

In the context that you get in the draw method, you can access tool_settings.mesh_select_mode which is the three boolean values for the current select mode setting. You then test them to decide if you add the related items.

def draw(self, context):
    layout = self.layout
    pie = layout.menu_pie()
    sel_mode = context.tool_settings.mesh_select_mode
    if sel_mode[0]: # vertex on
        pie.operator('mesh.remove_doubles')
        pie.operator('mesh.merge')
        if not sel_mode[1]:
            # only vert select - don't show if edge sel is also active
            pie.operator('mesh.bevel', text='Vertex Bevel').vertex_only=True
    if sel_mode[1]: # edge on
        pie.operator('mesh.mark_seam')
        pie.operator('mesh.edge_rotate').use_ccw=False
        pie.operator('mesh.bevel', text='Edge Bevel').vertex_only=False
    if sel_mode[2]: # face on
        pie.operator('mesh.flip_normals')
        pie.operator('mesh.inset')
        pie.operator('mesh.poke')