Slice the mozzarella and tomato into pieces about ¼ inch thick.
Pat the tomato slices dry with paper towels.
Spread softened butter over one side of each bread slice.
Turn the bread over and spread pesto across the unbuttered sides.
Layer the mozzarella, tomato, salt, black pepper, and basil over one slice.
Close the sandwich with the buttered sides facing outward.
Heat a skillet over medium-low heat for 2–3 minutes.
Cook the sandwich for 3–4 minutes on the first side.
Flip and cook for another 3–4 minutes until golden and melted.
Rest for 1–2 minutes before slicing and serving.