The poem starts out sounding almost envious: the clam is "lucky" because it has a shell to retreat into. But the tone shifts quickly. That same shell, which keeps others out, can't protect the clam from people who want something from it. They force it open hoping for a pearl, and if they don't find one, they throw it away.
The speaker seems to feel real sympathy for the creature. The last lines are the most painful, picturing the clam "disembowelled, splayed," its insides on show to "all and sundry passing by." The ellipsis at the end leaves the image hanging, as if the speaker can't quite look away.
Judging by the imagery, the clam may stand for any guarded, private person who gets exploited for what they can offer and then dropped. The mood begins lightly, even wryly, and ends in quiet sadness and exposure.