From the Super Mario Wiki
Not to be confused with Clam
Clampies are giant, purple Clam enemies that first appeared in New Super Mario Bros. Wii. They only appear in World 1-4 and in a secret area in 4-1. They will trap a character in its shell if it closes on a character, causing them to take damage and then opening back up. Most Clampies have Coins in their valves in order to lure a character close so they can attack them.
Clampies appear in the Cheep Cheep Lagoon and Daisy Cruiser racecourses in Mario Kart 7 for the Nintendo 3DS. They are obstacles that are found only underwater, and like in New Super Mario Bros. Wii, they have Coins and Item Boxes between their valves that racers can pick up, taking care of not being trapped by the Clampy's valves.
Clampies also appear in the Wii U title New Super Mario Bros. U where they act exactly like they do in New Super Mario Bros. Wii, and can be found in some levels of Sparkling Waters.
- A clam that serves the same function as the Clampies was first seen in the animated Mario film Super Mario Bros.: Peach-hime Kyushutsu Dai Sakusen! where it was seen keeping a captive Starman away from Mario by closing its shell and keeping the Starman in its valve. As a result, it may be possible that the Clampies may have been inspired from this early enemy.