Modelling of the multi-leaf collimator (MLC) in treatment planning systems (TPS) is crucial for the dose calculation accuracy of intensity-modulated radiation therapy plans. However, no standardised methodology for their configuration exists to date. In this study we present a method that separates the effect of each dosimetric characteristic of the MLC, offering comprehensive equations for the determination of the configuration parameters used in the TPS model. The main advantage of the method is that it only requires prior knowledge of the nominal leaf width and is based on doses measured with a Farmer chamber, which is a very well established and robust methodology. Another significant advantage is the required time, since measuring the tests takes only about 30 minutes per energy. Firstly, we provide a theoretical general formalism in terms of the primary fluence constructed from the transmission map obtained from an MLC model for synchronous and asynchronous sweeping beams. Secondly, we apply the formalism to the RayStation TPS as a proof of concept and we derive analytical expressions that allow the determination of the configuration parameters (leaf tip width, tongue-and-groove width, x-position offset and MLC transmission) and describe how they intertwine. Finally, we apply the method to Varian's Millennium120 and HD120 MLCs in a TrueBeam linear accelerator for different energies and determine the optimal configuration parameters. The proposed procedure is much faster and streamlined than the typical trial-and-error methods and increases the accuracy of dose calculation in clinical plans. Additionally, the procedure can be useful for standardising the MLC configuration process and it exposes the limitations of the implemented MLC model, providing guidance for further improvement of these models in TPSs.