Had the cutting out problem on my Mk3 N Plate 8V, Found a hole in the corner on this tube,

So i started to remove it and found this thing was snapped

Luckilly got the seal out without anything dropping into the engine head
hose on the engine side of the assembly looked like ths

Is that right? (full of yellow crap)
I have a basic understanding of engines but really cant afford to go to a dealer at the moment, would love to fix it myself
Obviously i need to replace both parts, but what does it doo? and can i run the car without it ?