BackgroundRecent studies have reported TIMs play an important role in tumors progression or regression, but the effect of TIMs in biliary tract cancer remains unclear. The aim of this study is to investigate the prognostic value of tumor infiltrating mast cells (TIMs) and its influence on gemcitabine-based adjuvant chemotherapy (ACT) benefits in biliary tract cancer patients after surgery.MethodsTIMs were evaluated by immunohistochemical staining of tryptase in 250 patients with resected gallbladder carcinoma (GBC) or extrahepatic bile duct carcinoma (EBDC) from Zhongshan Hospital. The relationships between TIMs and clinicopathological factors and postoperative prognosis were analyzed respectively.ResultsHigh TIMs infiltration was significantly correlated with prolonged overall survival (OS). Furthermore, multivariate analysis indicated TNM stage and TIMs as independent prognostic factors for OS. Patients with high TIMs infiltration appeared to significantly benefit from Gemcitabine-based ACT in the discovery and validation cohorts. Spearman analysis identified that TIMs infiltration were positively correlated with anti-tumor CD8+ T cells.ConclusionTIMs infiltration is an independent favorable prognostic factor in GBC and EBDC patients, which could better stratify patients with different prognosis and predict benefit from gemcitabine-based ACT.