A surgical controlling system comprising: at least one surgical tool insertable into a surgical environment of a body; a means to real-time locate 3D spatial positions of the surgical tools at any time t, in communication with a movement detection means and a movement database; a controller having a processing means in communication with a controller database and the movement detection means; and an endoscope, either one of the tools or in addition to them, to provide a real-time image of the surgical environment. The movement database stores the 3D spatial positions of the surgical tools at times tf and t0. A surgical tool has moved if its 3D spatial position at time tf differs from its position at time to. The controller database stores rules used by the controller to control the spatial positions of the surgical tools; the rules determine ALLOWED and RESTRICTED movements of the surgical tools.