The first time we see a cocktail specifically going by the name "Martini" is in the 1888 edition of Harry Johnson's "New and Improved Bartenders' Manual". While the recipe has a few more ingredients then we are used to, and may almost (but not quite) look more like a Martinez than it does a Martini, it does provide a good starting point to see how the Martini has evolved over time. In his recipe he simply callse for "vermouth" without indicating if it shoudl be dry or sweet. In those days, bartenders would realize that he naturally intended for sweet. While these days bartenders would assume otherwise.
It is interesting to note that the illustration that accompanied the recipe in Harry's book labeled the drink as the "Martine" instead of "Martini".