Skip to main content
Glama

get_list_contacts

Retrieve detailed contact information from Apollo.io lists, including emails, job titles, and company data for sales prospecting and outreach.

Instructions

Scrape/retrieve all contacts from a specific list with full details including emails, titles, companies, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesList ID
pageNoPage number (default: 1)
per_pageNoResults per page (default: 100)

Implementation Reference

  • The handler function that fetches contacts from a specific Apollo contact list via API, paginates results, and formats a detailed text summary of each contact including name, ID, email, title, company, phone, and LinkedIn.
    private async getListContacts(args: any) { const page = args.page || 1; const perPage = args.per_page || 100; const response = await this.axiosInstance.get(`/contact_lists/${args.id}/contacts`, { params: { page, per_page: perPage }, }); const contacts = response.data.contacts || []; const pagination = response.data.pagination || {}; let result = `List Contacts (${pagination.total_entries || contacts.length} total)\n`; result += `Page ${pagination.page || 1} of ${pagination.total_pages || 1}\n\n`; contacts.forEach((contact: any, index: number) => { result += `${index + 1}. ${contact.first_name} ${contact.last_name}\n`; result += ` ID: ${contact.id}\n`; result += ` Email: ${contact.email || "N/A"}\n`; result += ` Title: ${contact.title || "N/A"}\n`; result += ` Company: ${contact.account?.name || "N/A"}\n`; result += ` Phone: ${contact.phone_numbers?.[0]?.raw_number || "N/A"}\n`; result += ` LinkedIn: ${contact.linkedin_url || "N/A"}\n\n`; }); return { content: [ { type: "text", text: result, }, ], }; }
  • Tool registration including name, description, and input schema defining required 'id' for the list and optional pagination parameters.
    { name: "get_list_contacts", description: "Scrape/retrieve all contacts from a specific list with full details including emails, titles, companies, etc.", inputSchema: { type: "object", properties: { id: { type: "string", description: "List ID", }, page: { type: "number", description: "Page number (default: 1)", }, per_page: { type: "number", description: "Results per page (default: 100)", }, }, required: ["id"], }, },
  • src/index.ts:84-85 (registration)
    Dispatch registration in the main tool call handler switch statement that routes calls to the getListContacts method.
    case "get_list_contacts": return await this.getListContacts(args);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/masridigital/apollo.io-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server