A glucose tolerance test is performed to check the body's response to sugar or glucose.