The Mongols practiced diplomatic immunity, if you were attacked there would be severe repercussions to the nation in question. There is actually a perfect example in the Mongol invasion of the Khwarezmid Empire. Initially the Mongols had no intention of attacking the Khwarezmid Empire as they were embroiled in the Invasion of Jin China. When a Mongol trade caravan sent to the city of Otrar was confiscated by the Governar, Inalchuq, Chinggis Khan sent an emissary of three men, two Mongols and one Muslum to the Khwarezmid Shah demanding that Inalchuq be brought to justice. The Shah responded by shaving the beards of the two Mongols and killing the Muslim. Upon hearing this, Chinggis Khan pulled his main forces out of the Jin Empire and invaded the Khwarezmid Empire. In two years it was done. What this goes to show is that the Mongols took diplomatic immunity very seriously and if a nation violated it by harming you in this case they would face complete and utter destruction. This would in most cases also be the case if the nation knew that the Mongols were about to invade as killing the emissaries would only incense the Mongols to more severe massacres and targeted killings. Referring back to the Invasion of the Khwarezmid Shah, the Mongols sent a troop of soldiers lead by Subotai himself, the greatest Mongol General to capture the Shah, in the end he managed to escape to an island in the Caspian Sea where he died. A leader of a nation would be hesitant to risk the personal wrath of the Mongols.
Information from the Secret History of the Mongols as well as from Genghis Khan and the Making of the Modern World by Jack Weatherford.
Good question!
I am not a historian, but will try to comply with (rightfully!) strict rules of this subreddit. As has been pointed out by /u/Iamnotwithouttoads, Mongols took diplomatic immunity very seriously comparing to most European and Middle Eastern states of that time and the incident with the Khwarezmian Empire is indeed a good example.
A similar story took place in 1223 when the Mongols fought against the Cumans near Don river. The Cumans asked Kievan Rus' to help while the Mongols sent a diplomatic mission with peace offer to the dukes of Kievan Rus' . However, the Russians decided to help the Cumans and killed the Mongolian ambassadors. This led to the devastating conquest of Kievan Rus' by Batu Khan in 1237-1240.
Mongols had no intentions to fight against Rus' - these cold, forest lands were not attractive at all to them, however, a cruel act of killing an ambassador was a serious offence and had to be avenged.
Furthermore, Vernadsky mentions that the Mongolic ambassadors killed by the Russians in 1223 were Christian (Nestorian). Therefore, it is perhaps the strife between Chalcedonian and Nestorian Christians that urged the Russian dukes to kill the Mongolic diplomatic mission. The reason making some historians to believe this is that later Subutai sent another ambassadors (pagan) to Kievan Rus' and this mission returned unscathed. It was not uncommon to treat pagans better than heretics in Middle Ages.
I also recall reading somewhere that the Mongols used to send "suicide" ambassadors to provoke heads of states by offending them, but cannot find any reliable sources of that now.
Sources:
P.S. While I was writing this answer, another question came to my mind. Obviously, the Mongols considered killing an ambassador as something unforgivable, as well as killing a guest. I have read that European barbaric tribes in Early Middle Ages had similar attitude - killing a guest was a very serious offence. However, this had gradually changed once these people became more "civilized". It would be really intersting to see comments from someone familiar with this topic.
Follow up question - What level of autonomy would be given to ambassadors around the time of Genghis Khan, given the slow speed of communication during that period?
Follow up question - would the messenger typically be likely to be carrying greetings, trade deals, or threats? And would he be accompanied by a military force?