Context. HESS J1731-347 has been identified as one of the few TeV-bright shell type supernova remnants (SNRs). These remnants are dominated by nonthermal emission. and the nature of TeV emission has been continuously debated for nearly a decade. Aims. We carry out the detailed modeling of the radio to gamma-ray spectrum of HESS J1731-347 to constrain the magnetic field and energetic particles sources, which we compare with those of the other TeV-bright shell-type SNRs explored before. Methods. Four years of data from Fermi Large Area Telescope (LAT) observations for regions around this remnant are analyzed, leading to no detection correlated with the source discovered in the TeV band. The Markov chain Monte Carlo method is used to constrain parameters of one-zone models for the overall emission spectrum. Results. Based on the 99.9% upper limits of fluxes in the GeV range, one-zone hadronic models with an energetic proton spectral slope greater than 1.8 can be ruled out, which favors a leptonic origin for the gamma-ray emission, making this remnant a sibling of the brightest TeV SNR RX J1713.7-3946, the Vela Junior SNR RX J0852.0-4622. and RCW 86. The best fit leptonic model has an electron spectral slope of 1.8 and a magnetic field of similar to 30 mu G. which is at least a factor of 2 higher than those of RX 31713.7-3946 and RX 30852.0-4622. posing a challenge to the distance estimate and/or the energy equipartition between energetic electrons and the magnetic field of this source. A measurement of the shock speed will address this challenge and has implications on the magnetic field evolution and electron acceleration driven by shocks of SNRs.