get_lists
Retrieve all contact lists from your Apollo.io account to access and manage collections of saved sales prospects for outreach and analysis.
Instructions
Get all contact lists in your Apollo account. Lists are collections of saved contacts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number |
Implementation Reference
- src/index.ts:939-962 (handler)The main handler function for the 'get_lists' tool. It makes an API call to Apollo's /contact_lists endpoint, processes the response, and formats a text summary of all contact lists including ID, name, contact count, and creation date.private async getLists(args: any) { const response = await this.axiosInstance.get("/contact_lists", { params: args, }); const lists = response.data.contact_lists || []; let result = `Contact Lists (${lists.length}):\n\n`; lists.forEach((list: any, index: number) => { result += `${index + 1}. ${list.name}\n`; result += ` ID: ${list.id}\n`; result += ` Contacts: ${list.num_contacts || 0}\n`; result += ` Created: ${list.created_at ? new Date(list.created_at).toLocaleDateString() : "N/A"}\n\n`; }); return { content: [ { type: "text", text: result, }, ], }; }
- src/index.ts:390-403 (registration)Tool registration in the getTools() method's return array. Defines the tool name, description, and input schema for pagination.{ name: "get_lists", description: "Get all contact lists in your Apollo account. Lists are collections of saved contacts.", inputSchema: { type: "object", properties: { page: { type: "number", description: "Page number", }, }, }, },
- src/index.ts:394-402 (schema)Input schema definition for the get_lists tool, specifying optional page parameter for pagination.inputSchema: { type: "object", properties: { page: { type: "number", description: "Page number", }, }, },
- src/index.ts:82-83 (handler)Dispatch case in the tool request handler that routes 'get_lists' calls to the getLists method.case "get_lists": return await this.getLists(args);