Putting toothpaste on a toothbrush may seem like a simple everyday task, but for a group of middle school students at the Mission Hill K-8 School, it’s become a complicated process involving marbles, magnets and even mousetraps. The group of six 7th and 8th graders competed recently in the Third Annual Rube Goldberg Machine Design Contest for Middle School Students, hosted by the Fay School in Southborough. The competition is modeled after MIT’s annual machine contest, in which young engineers create innovative and complex devices to perform simple tasks. This year’s challenge was to design a device from a set of standard materials—everything from matchbox cars to pulleys to bouncy balls—that can squeeze a precise amount of toothpaste onto a toothbrush in the most inefficient way possible, utilizing at least five steps and resulting in a final weight of 10.7 grams. The students had been experimenting with design ideas and practicing with materials since January. During the competition, they had just three hours to build it from scratch.