All Purpose Portable Plumber's Helper
From the Super Mario Wiki
When Mario needs to cut through the chain that was keeping Princess Toadstool attached to King O'Koopa's throne, he pulls out his All Purpose Portable Plumber's Helper and uses the hacksaw to start cutting through the chain.
How the All Purpose Portable Plumber's Helper works is unknown, as it is capable of holding tools that can extend to lengths larger than the unit itself. One must simply press a button to trigger the tools one-by-one. Aside from the hacksaw, other tools that are shown includes a knife and a wrench.