To avoid such a mess, start with a sharp chef's knife, and store both the knife and a pie server in boiling water, thoroughly drying them before cutting into the pie. The water will heat the metal, so as you cut, the knife will slightly dissolve the sugars in the pie, making for a clean break.
Try this simple trick: cut two pieces of pie side by side, then use the pie server to scoop out one piece. This allows the slices of pie to be removed more easily. If you're cutting multiple slices, precut the entire pie before using the pie server to scoop the pieces out of the tin.