A fiber Bragg grating patterned on a SnO2 thin film deposited on the flat surface of a D-shaped polished optical fiber is studied in this work. The fabrication parameters of this structure were optimized to achieve a trade-off among reflected power, full width half maximum (FWHM), sensitivity to the surrounding refractive index (SRI), and figure of merit (FOM). In the first place, the influence of the thin film thickness, the cladding thickness between the core and the flat surface of the D-shaped fiber (neck), and the length of the D-shaped zone over the reflected power and the FWHM were assessed. Reflected peak powers in the range from −2 dB to −10 dB can be easily achieved with FWHM below 100 pm. In the second place, the sensitivity to the SRI, the FWHM, and the FOM were analyzed for variations of the SRI in the 1.33–1.4 range, the neck, and the thin-film thickness. The best sensitivities theoretically achieved for this device are next to 40 nm/RIU, while the best FOM has a value of 114 RIU−1.