import arcpy, os.path

mxdName = arcpy.GetParameterAsText(0)
arcpy.AddMessage("The MXD Name is: " + mxdName)
if os.path.isfile(mxdName):
    # Tool variables
    mxd = mxdName
    webmapName = arcpy.GetParameterAsText(1)
    summary = "CAD Editing Project"
    tags = "CAD, " + mxdName 
    folder = "CAD Projects"
    
    arcpy.MXDToWebMap_server(mxd, webmapName, summary, tags, "", "", folder)
    
arcpy.SetParameter(1, True)