External DB query API tool