Preheat the oven. Preheat the oven to 400°F / 200°C (180°C fan).
Cook the tomatoes. Set a 10-inch (25-cm) ovenproof skillet (a well-seasoned cast iron works well) over medium-high heat. Add the olive oil, then the tomatoes. Make sure the tomatoes are dry so the oil doesn’t splash. Cook for about 4 minutes, moving the tomatoes around the pan. Then, season with a pinch of salt and pepper.
Add the butter and minced shallot. Turn the heat down to medium, then add the butter. Once it melts, add the minced shallot and cook for 2–3 minutes until softened. Stir often.
Whisk the eggs. While the tomatoes and shallot cook, whisk together the eggs, cream, and a pinch of salt. Stir in half the parmesan to season the eggs.
Add the eggs. Turn off the heat under the skillet or take it off the heat, and add the whisked eggs over the tomatoes and shallot, stirring to distribute them equally.
Add the cheese and pesto. Using a teaspoon, dot small dollops of mascarpone over the eggs, then do the same with the pesto. Sprinkle the gruyère and remaining parmesan over the top.
Bake. Transfer the skillet to the oven and bake for about 13-15 minutes, until the eggs are set in the center. Use an oven mitt, since the handle will be very hot.
Serve. Let the frittata cool down for 5 minutes, then slice and serve.