A surgical stapler main body, a nail box (50), a surgical stapler and a method for controlling a surgical stapler. The surgical stapler main body comprises an identification portion (22), the identification portion (22) being able to identify information in a storage portion (52) which is connected to a nail box assembly (51) and capable of storing information about the nail box assembly (51); and the surgical stapler main body further comprises a control portion which is able to analyze the information stored in the storage portion (52) and to issue an instruction, a power portion which is able to provide a power source for the surgical stapler main body, and a driving portion which is able to drive the nail box assembly (51) to close. The present invention ensures that the driving portion is able to drive a firing rod (31) to stably move, preventing a large vibration, caused by the movement of the firing rod (31) during manual operation, from affecting the suturing, reducing the medical risk from human misoperation; in addition, the surgical stapler main body is able to be adapted to multiple types of nail boxes (50), greatly reducing the purchasing cost of medical instrument and the maintenance cost of the surgical stapler main body additionally purchased.L'invention concerne un corps principal d'agrafeuse chirurgicale, une boîte de clous (50), une agrafeuse chirurgicale et un procédé de commande d'une agrafeuse chirurgicale. Le corps principal d'agrafeuse chirurgicale comprend une partie identification (22), la partie identification (22) étant apte à identifier des informations dans une partie stockage (52) qui est connectée à un ensemble boîte de clous (51) et apte à stocker des informations concernant l'ensemble boîte de clous (51) ; et le corps principal d'agrafeuse chirurgicale comprend en outre une partie commande qui est apte à analyser les informations stockées dans la partie stockage (52) et pour émettre une instruction, une partie alimentation qui est a