In a technological context where, thanks to the additive manufacturing techniques, even sophisticated geometries as well as surfaces with specific micrometric features can be realized, we propose a mechano-regulation algorithm to determine the optimal microgeometric parameters of the surface of textured titanium devices for biomedical applications. A poroelastic finite element model was developed including a portion of bone, a portion of a textured titanium device and a layer of granulation tissue separating the bone from the device and occupying the space between them. The algorithm, implemented in the Matlab environment, determines the optimal values of the root mean square and the correlation length that the device surface must possess to maximize bone formation in the gap between the bone and the device. For low levels of compression load acting on the bone, the algorithm predicts low values of root mean square and high values of correlation length. Conversely, high levels of load require high values of root mean square and low values of correlation length. The optimal microgeometrical parameters were determined for various thickness values of the granulation tissue layer. Interestingly, the predictions of the proposed computational model are consistent with the experimental results reported in the literature. The proposed algorithm shows promise as a valuable tool for addressing the demands of precision medicine. In this approach, the device or prosthesis is no longer designed solely based on statistical averages but is tailored to each patient's unique anthropometric characteristics, as well as considerations related to their metabolism, sex, age, and more.