More precisely:
Given an algebraic number $a\ge0$, can we determine if there exists a rational number $b$ such that $$\arctan (a)=\int_0^a \frac{dx}{x^2+1}=\pi b?$$ If so, can we find the rational number $b$?
Examples: $$\arctan (2-\sqrt{3})=\frac{\pi}{12}$$ $$\arctan \left(\sqrt{5-2\sqrt{5}}\right)=\frac{\pi}{5}$$
Note: I know how to do the "reverse procedure" (i.e. given a rational number $b$, find the algebraic number $\tan (\pi b)$).
If $a=\tan\theta$, then $$e^{i\theta}=\cos\theta+i\sin\theta=\pm\frac{1+ia}{\sqrt{a^2+1}}.$$ Now, note that $\theta$ is a rational multiple of $\pi$ if and only if $\omega=e^{i\theta}$ is a root of unity, i.e. if and only if it satisfies $\omega^n=1$ for some positive integer $n$. Furthermore, in this case, $\omega$ will be a root of the $n$th cyclotomic polynomial, which has degree $\varphi(n)$, which satisfies the inequality $\varphi(n)\geq \sqrt{n/2}$. So, we can follow the following procedure: