From Zelda Wiki, the Zelda encyclopedia
The Bone Ocarina
is an item in Freshly-Picked Tingle's Rosy Rupeeland
The Bone Ocarina is obtained shortly after clearing the second dungeon, the Pirate Hideaway in Cape Treasure. The Bone Ocarina can be used to summon the pirates while standing on a dock. These docks can be found in Cape Treasure in the First Continent, Gooey Swamp in the Second Continent and Mount Desma in the Third Continent.
After helping the pirates for a second time in the Gooey Swamp the Bone Ocarina will be upgraded. It can then be used to open the ten hidden blue pirate treasure chests once they are found.