  We search for an optimal filter design for the estimation of stellar
metallicity, based on synthetic photometry from Gaia XP spectra convolved with
a series of filter-transmission curves defined by different central wavelengths
and bandwidths. Unlike previous designs based solely on maximizing metallicity
sensitivity, we find that the optimal solution provides a balance between the
sensitivity and uncertainty of the spectra. With this optimal filter design,
the best precision of metallicity estimates for relatively bright ($G \sim
11.5$) stars is excellent, $\sigma_{\rm [Fe/H]} = 0.034$\,dex for FGK dwarf
stars, superior to that obtained utilizing custom sensitivity-optimized filters
(e.g., SkyMapper\,$v$). By selecting hundreds of high-probabability member
stars of the open cluster M67, our analysis reveals that the intrinsic
photometric-metallicity scatter of these cluster members is only 0.036\,dex,
consistent with this level of precision. Our results clearly demonstrate that
the internal precision of photometric-metallicity estimates can be extremely
high, even providing the opportunity to perform chemical tagging for very large
numbers of field stars in the Milky Way. This experiment shows that it is
crucial to take into account uncertainty alongside the sensitivity when
designing filters for measuring the stellar metallicity and other parameters.
