The words in this excerpt from The Count of Monte Cristo that can be used as synonyms to determine the meaning of the word grotto is this:
"The second grotto was lower and more gloomy than the first; the air that could only enter by the newly formed opening had the mephitic smell Dantès was surprised not to find in the outer cavern. "