Okay, the "Giant Coral" from Nehwon gives it quite a bit of additional info.
Firstly, this creature is not a true worm, but a giant carnivorous coral polyp. Its tube is secreted, not built up like a tube worm.
Secondly, colonies of these "Coral Worms" live in reefs formed of maze-like complexes of interlinked tubes. Each worm lives in its own tube at the edge of this reef that connects to the tube complex. The creature can swim out from its tube to pursue prey, or retreat into the depth of the reef to avoid threats.
Thirdly, they only "occasionally" swim out of their tubes, giving added evidence for being able to fight from inside a tube.
Fourthly, they can move relatively quickly (12") while inside a tube, but are slow swimmers outside. That suggests revising the tube info to something like:
Coral Tube (Ex): Coral worms secrete tubes of coral to live inside. The tube pearly smooth inside, but covered with razor-sharp ridges on the outside. When fighting from inside a tube, a coral worm gains cover (+4 to AC and +2 to Reflex saves) plus a +4 circumstance bonus to its AC, for a total bonus to Armor Class of +8. In addition, the razor-sharp exterior gives the worm a spiny defense (see below). A coral worm can withdraw entirely inside a coral tube to gain the benefits of full cover.
The coral tubes of a colony of coral worms interconnect to form an extensive reef. Such tube complexes are a maze of passages which open into chambers where many coral worms can simultaneously attack intruders from all sides.
Coral tubes have hardness 7 and 50 hit points per 5 ft. section.
Spiny Defense (Ex): Any creature outside a coral tube that attacks a coral worm inside the tube (or the tube itself) must succeed at a DC 12 Reflex save or take 1d10 slashing damage from the razor-sharp shards covering the tube. Note that weapons with exceptional reach, such as longspears, do not endanger their users in this way. the save DC is Dexterity-based.
Tubular Speed (Ex): A coral worm can move at a speed of 30 ft. when any part of its body is within a coral tube.