Whenever you cast an artifact spell, you may put a charge counter on Golem Foundry. Remove three charge counters from Golem Foundry: Put a 3/3 colorless Golem artifact creature token onto the battlefield.
Official Rulings for Golem Foundry
1/1/2011 : Whenever you cast an artifact spell, Golem Foundry's first ability triggers and goes on the stack on top of it. It will resolve before the artifact spell does.