Call 911. In case of an emergency, before you do anything else, call 911 to ensure help will be on the way. Costa Rica has a very effective emergency response network that involves hospitals, firemen and the police fleet. You can also call the Red Cross directly by dialing 128, but 911 has more resources.
For legal situations or situations like losing your passport, contact your embassy or Costa Rica Monkey Tours emergency numbers 011-506-8822-1000 / 011-506-6050-2729.