BackgroundThe adoption of digital health technologies can improve the quality of care for polypharmacy patients, if the underlying complex implementation mechanisms are better understood. Context effects play a critical role in relation to implementation mechanisms. In primary care research, evidence on the effects of context in the adoption of digital innovation for polypharmacy management is lacking.Study aimThis study aims to identify contextual factors relevant to physician behavior and how they might mediate the adoption process.MethodsThe physicians who participated in this formative evaluation study (n= 218) were part of the intervention group in a cluster-randomized controlled trial (AdAM). The intervention group implemented a digital innovation for clinical decision making in polypharmacy. A three-step methodological approach was used: (1) a realist inquiry approach, which involves the description of a context-mechanism-outcome configuration for the primary care setting; (2) a belief elicitation approach, which involves qualitative content analysis and the development of a quantitative latent contextualized scale; and (3) a mediation analysis using structural equation modeling (SEM) based on quantitative survey data from physicians to assess the mediating role of the contextualized scale (n= 179).ResultsThe key dimensions of a (1) context-mechanism-outcome model were mapped and refined. A (2) latent construct of the physicians’ innovation beliefs related to the effectiveness of polypharmacy management practices was identified. Innovation beliefs play a (3) mediating role between the organizational readiness to implement change (p< 0.01) and the desired behavioral intent of physicians to adopt digital innovation (p< 0.01;R2= 0.645). Our contextualized model estimated significant mediation, with a relative size of 38% for the mediation effect. Overall, the model demonstrated good fit indices (CFI = 0.985, RMSEA = 0.034).ConclusionPhysician adoption is directly affected by the readiness of primary care organizations for the implementation of change. In addition, the mediation analysis revealed that this relationship is indirectly influenced by primary care physicians’ beliefs regarding the effectiveness of digital innovation. Both individual physician beliefs and practice organizational capacity could be equally prioritized in developing implementation strategies. The methodological approach used is suitable for the evaluation of complex implementation mechanisms. It has been proven to be an advantageous approach for formative evaluation.Trial registrationNCT03430336. First registration: 12/02/2018. ClinicalTrials.gov.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12875-023-02081-x.