Whir of Invention

Improvise (Your artifacts can help cast this spell. Each artifact you tap after you're done activating mana abilities pays for {1}.)
Search your library for an artifact card with mana value X or less, put it onto the battlefield, then shuffle.