Preheat oven to 350 degrees F (175 degrees C). Grease 2 baking sheets.
Mix flour, sugar, and baking powder together in a large bowl. Cut in margarine with 2 knives or a pastry blender. Add eggs and vanilla extract; mix well until dough comes together and is smooth. If dough is sticky, add more flour.
Roll out dough on floured work surface until it is about 1/4-inch thick. Press the rim of a glass into flour and then into the dough to cut out circles.
Place 1/2 teaspoon filling into the center of each circle. Fold up the 3 sides into a triangle shape, pinching the sides together tightly to seal. Transfer cookies to baking sheets.
Bake in the preheated oven until cookies are golden brown, about 25 minutes.