Let $K$ be a number field, such as $\mathbb{Q}(\sqrt{d})$ for $d$ a square-free integer. I am looking for an algorithm that outputs whether some $\alpha \in K$ has a square root in $K$, i.e. when there is $\beta \in K$ such that $\beta^2 = \alpha$. In the case of $\mathbb{Q}(\sqrt{d})$, testing whether $a + b \sqrt{d}$ has a square root is equivalent to finding $x,y \in \mathbb{Q}$ such that $$a + b \sqrt{d} = (x + y \sqrt{d})^2 = (x^2 + d y^2) + 2xy \sqrt{d}.$$ But I am unsure when the system $$a = x^2 + d y^2, b = 2xy$$ is solvable, nor what to do for a general number field.
Such an algorithm is the same as one that outputs whether the polynomial $x^2 - \alpha \in K[x]$ is irreducible. (While I'd be interested in learning about an irreducibility criterion for all polynomials in $K[x]$, for my purposes I only need the quadratic case.)
I've searched around for such irreducibility criteria, like Eisenstein's, but I didn't see one that works for polynomials defined over a number field.