Get selected Lead for a custom function

Get selected Lead for a custom function

We are trying to create a custom function that will send messaged to selected Leads.

Using zoho.crm.getRecords("Leads") , we were able to fetch all records but not sure on how can we get only records that are selected on the Leads list page?