Let $\{a_n\}_{n\geq 1}$, $|a_n|\leq 1$, be such that $F(s) = \sum_{n=1}^\infty a_n n^{-s}$ can be continued analytically to a neighborhood of the line $\Re s = 1$. (For instance, let $a_n = \mu(n)$.) The truncated Perron formulae I know (e.g., Corollary 5.3 in Montgomery-Vaughan, or Thm 2.3 in Chapter II.2 of Tenenbaum (3rd ed)) give $$\sum_{n\leq x} a_n = \int_{1-iT}^{1+i T} F(s) x^s \frac{ds}{s} + O\left(\frac{x \log x}{T}\right),$$ and, assuming that $F(s) = 0$, $$\sum_{n\leq x} \frac{a_n}{n} = \int_{-iT}^{i T} F(1+s) x^s \frac{ds}{s} + O\left(\frac{ \log x}{T}\right).$$
Question:
Can one give a truncated Perron formula with an error term of about $O(x/T)$ or $O(1/T)$, respectively (or $O(x (\log T)/T)$ or $O((\log T)/T)$, say), at least under some reasonable circumstances?
Bonus points if the formula is explicit