A medical system, having a treatment tool; an endoscope having an image sensor configured to capture an image; a driver configured to drive the endoscope; and a processor configured to control the driver, wherein the processor is configured to determine a locus of the treatment tool and control the driver for operating the endoscope according to the determined locus.