Cut deep slits into the baguette without slicing through. Spread pesto into each slit, then tuck in slices of mozzarella and tomato. Brush with olive oil and sprinkle with coarse salt.
Bake until the cheese is melted and the bread is crisp and golden, 15 to 20 minutes.
Finish with chopped parsley, if using, and serve warm.