add API search action preview; fix PHP warnings on tools page