Preheat oven to 350 F
Place the butter and the sugar in a bowl and beat together until light and fluffy.
Beat in the egg.
Add in the oats, milk, and vanilla extract. Beat together until well combined.
Add in the flour, unsweetened cocoa powder, xanthan gum, and baking powder into the cookie batter. Beat until well combined.
Stir in the chocolate pieces until well incorporated.
Spray the mini muffin tin with the baking spray. Spoon in the cookie dough into the muffin cavities to fill it in just to the top.
Bake in a preheated oven for 15 minutes, or until lightly risen and firm.
Let cool in the muffin tin for 10 minutes.
To transfer them out from the muffin tin onto the cooling rack, gently twist the cookie and pull it out. If you feel that it is still stuck let it cool in the muffin tin for a little longer. You may even use the back end of a teaspoon to gently go around and underneath it to help lift it out of the muffin tin.
Allow cookies to cool completely on the cooling rack before serving. Store in a tightly sealed container.