Skip to main content
Glama
masridigital

Apollo.io MCP Server

by masridigital

get_list_contacts

Retrieve comprehensive contact details from a specific Apollo.io list, including emails, titles, and company information for sales intelligence and outreach planning.

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 main handler function for the 'get_list_contacts' tool. It fetches contacts from a specified Apollo contact list using the API, handles pagination, and formats a detailed text response with contact information including names, IDs, emails, titles, companies, phones, and LinkedIn URLs.
    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,
          },
        ],
      };
    }
  • The input schema for the 'get_list_contacts' tool, defining required 'id' parameter and optional pagination parameters.
    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:404-426 (registration)
    The tool registration in the getTools() method, including name, description, and input schema for listing tools.
    {
      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)
    The switch case in the CallToolRequestSchema handler that routes calls to the getListContacts method.
    case "get_list_contacts":
      return await this.getListContacts(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'scrape/retrieve' and 'full details', implying a read operation with comprehensive data, but doesn't specify permissions required, rate limits, pagination behavior (beyond schema hints), or potential side effects (e.g., if 'scrape' implies aggressive data fetching). For a tool with no annotation coverage, this leaves significant gaps in understanding its operational traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and resource. It avoids redundancy and wastes no words, though it could be slightly more structured (e.g., separating scope details). Every part earns its place by clarifying what's retrieved.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 3 parameters, the description is incomplete. It lacks behavioral details (e.g., pagination, rate limits), output format information, and usage context. For a retrieval tool with multiple parameters and no structured output, more guidance is needed to ensure the agent can use it effectively without guesswork.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for 'id' (List ID), 'page' (Page number), and 'per_page' (Results per page). The description adds no parameter-specific information beyond what the schema provides, such as format examples for 'id' or constraints on 'per_page'. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('scrape/retrieve') and resource ('all contacts from a specific list'), specifying the scope ('full details including emails, titles, companies, etc.'). It distinguishes from sibling tools like 'get_lists' (which likely lists contact lists rather than contacts within a list) and 'search_people' (which searches across people rather than retrieving from a specific list). However, it doesn't explicitly differentiate from 'get_person_activity' or 'analyze_list', which might involve contact data but serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a list ID), exclusions (e.g., not for searching across lists), or direct comparisons to siblings like 'search_people' (for broader searches) or 'analyze_list' (for analysis rather than retrieval). Usage is implied by the action and resource but lacks explicit context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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