Pierce Brosnan's Wife Carrot Cake Screwed Me Up Bad

 Keely Brosnan
We now know why Pierce Brosnan's wife claims she suffered "permanent injuries to her health, strength and activity" at an L.A. restaurant -- she took a bite of carrot cake with a special surprise inside ... a rock-hard walnut shell.

We broke the story ... Keely Brosnan sued R&D Kitchen claiming she became "sore, ill, and injured" after eating at the joint in October, 2009.

The suit doesn't specify what she ate -- but a rep for the restaurant now tells us ... Keely had complained about a walnut shell inside a piece of carrot cake that may have fractured her tooth.

The rep tells us, the restaurant immediately contacted its insurance company after the incident -- insisting, "We take food safety and cleanliness very seriously."  Apparently, if a payout was offered, it wasn't enough.