Skip to main content
Glama
masridigital

Apollo.io MCP Server

by masridigital

remove_from_sequence

Remove specific contacts from a sales sequence in Apollo.io by providing sequence and contact IDs to manage prospect lists.

Instructions

Remove contacts from a sequence. Provide sequence ID and contact IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sequence_idYesSequence ID
contact_idsYesArray of contact IDs to remove

Implementation Reference

  • The primary handler function that executes the tool. It makes a POST request to the Apollo API endpoint `/emailer_campaigns/{sequence_id}/remove_contact_ids` with the contact_ids, ignores the response, and returns a formatted success message indicating the number of contacts removed.
    private async removeFromSequence(args: any) {
      const response = await this.axiosInstance.post(
        `/emailer_campaigns/${args.sequence_id}/remove_contact_ids`,
        {
          contact_ids: args.contact_ids,
        }
      );
    
      return {
        content: [
          {
            type: "text",
            text: `Successfully removed ${args.contact_ids.length} contact(s) from sequence ${args.sequence_id}`,
          },
        ],
      };
    }
  • The input schema defining the required parameters for the tool: sequence_id (string) and contact_ids (array of strings). Used for validation in the MCP tool call.
    inputSchema: {
      type: "object",
      properties: {
        sequence_id: {
          type: "string",
          description: "Sequence ID",
        },
        contact_ids: {
          type: "array",
          items: { type: "string" },
          description: "Array of contact IDs to remove",
        },
      },
      required: ["sequence_id", "contact_ids"],
    },
  • src/index.ts:370-389 (registration)
    The tool registration object returned by getTools(), including name, description, and inputSchema. This makes the tool available to the MCP server.
    {
      name: "remove_from_sequence",
      description:
        "Remove contacts from a sequence. Provide sequence ID and contact IDs.",
      inputSchema: {
        type: "object",
        properties: {
          sequence_id: {
            type: "string",
            description: "Sequence ID",
          },
          contact_ids: {
            type: "array",
            items: { type: "string" },
            description: "Array of contact IDs to remove",
          },
        },
        required: ["sequence_id", "contact_ids"],
      },
    },
  • src/index.ts:80-81 (registration)
    Switch case in the tool execution handler that dispatches calls to 'remove_from_sequence' to the corresponding method.
    case "remove_from_sequence":
      return await this.removeFromSequence(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