Skip to main content
Glama
masridigital

Apollo.io MCP Server

by masridigital

analyze_sequence

Analyze email sequence performance metrics including open rates, reply rates, bounce rates, and step-by-step analytics to optimize sales outreach effectiveness.

Instructions

Analyze a sequence's performance with detailed metrics: open rates, reply rates, bounce rates, contacts added, active contacts, and step-by-step analytics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSequence ID to analyze

Implementation Reference

  • The main handler function for the analyze_sequence tool. Fetches sequence data from Apollo API, computes and displays performance metrics (open/reply/click/bounce rates), step breakdown, and provides performance insights.
    private async analyzeSequence(args: any) {
      const response = await this.axiosInstance.get(`/emailer_campaigns/${args.id}`);
      const seq = response.data.emailer_campaign;
    
      let result = `Sequence Analysis: ${seq.name}\n\n`;
      result += `=== Overview ===\n`;
      result += `ID: ${seq.id}\n`;
      result += `Status: ${seq.active ? "Active" : "Inactive"}\n`;
      result += `Created: ${seq.created_at ? new Date(seq.created_at).toLocaleDateString() : "N/A"}\n`;
      result += `Total Steps: ${seq.num_steps || 0}\n\n`;
    
      result += `=== Performance Metrics ===\n`;
      result += `Total Contacts Added: ${seq.unique_scheduled || 0}\n`;
      result += `Active Contacts: ${seq.num_contacted_people || 0}\n`;
      result += `Bounced: ${seq.bounce_rate ? `${(seq.bounce_rate * 100).toFixed(2)}%` : "0%"}\n`;
      result += `Replied: ${seq.reply_rate ? `${(seq.reply_rate * 100).toFixed(2)}%` : "0%"}\n`;
      result += `Opened: ${seq.open_rate ? `${(seq.open_rate * 100).toFixed(2)}%` : "0%"}\n`;
      result += `Clicked: ${seq.click_rate ? `${(seq.click_rate * 100).toFixed(2)}%` : "0%"}\n\n`;
    
      if (seq.emailer_steps && seq.emailer_steps.length > 0) {
        result += `=== Step-by-Step Breakdown ===\n`;
        seq.emailer_steps.forEach((step: any, index: number) => {
          result += `\nStep ${index + 1}: ${step.type || "Email"}\n`;
          result += `  Subject: ${step.subject || "N/A"}\n`;
          result += `  Wait Time: ${step.wait_time || 0} days\n`;
          result += `  Max Emails: ${step.max_emails_per_day || "Unlimited"}\n`;
        });
      }
    
      result += `\n=== Insights ===\n`;
      if (seq.reply_rate && seq.reply_rate > 0.1) {
        result += `✓ Strong reply rate - this sequence is performing well\n`;
      } else if (seq.reply_rate && seq.reply_rate < 0.05) {
        result += `⚠ Low reply rate - consider reviewing messaging and targeting\n`;
      }
    
      if (seq.bounce_rate && seq.bounce_rate > 0.05) {
        result += `⚠ High bounce rate - verify email quality\n`;
      }
    
      if (seq.open_rate && seq.open_rate < 0.3) {
        result += `⚠ Low open rate - test different subject lines\n`;
      }
    
      return {
        content: [
          {
            type: "text",
            text: result,
          },
        ],
      };
    }
  • src/index.ts:326-340 (registration)
    Tool registration in getTools() method, including name, description, and input schema requiring sequence ID.
    {
      name: "analyze_sequence",
      description:
        "Analyze a sequence's performance with detailed metrics: open rates, reply rates, bounce rates, contacts added, active contacts, and step-by-step analytics.",
      inputSchema: {
        type: "object",
        properties: {
          id: {
            type: "string",
            description: "Sequence ID to analyze",
          },
        },
        required: ["id"],
      },
    },
  • Input schema definition for analyze_sequence tool, validating a required 'id' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        id: {
          type: "string",
          description: "Sequence ID to analyze",
        },
      },
      required: ["id"],
    },
  • Switch case dispatcher in CallToolRequestSchema handler that routes analyze_sequence calls to the analyzeSequence method.
    case "analyze_sequence":
      return await this.analyzeSequence(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 'detailed metrics' but doesn't specify whether this is a read-only operation, requires permissions, has rate limits, or what the output format entails. For a tool with no annotations, this leaves significant behavioral gaps.

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 lists key metrics upfront, making it front-loaded and easy to parse. It avoids unnecessary words, though it could be slightly more structured by separating core purpose from metric details.

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

Completeness3/5

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

Given one parameter with full schema coverage and no output schema, the description adequately covers the purpose and metrics but lacks behavioral context (e.g., permissions, output format) and usage guidelines. It's minimally viable for a simple read operation but incomplete for informed tool selection.

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 the single parameter 'id' documented as 'Sequence ID to analyze'. The description doesn't add any parameter details beyond what the schema provides, such as format or validation rules, so it meets the baseline for high schema coverage without extra value.

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 tool analyzes sequence performance with specific metrics (open rates, reply rates, bounce rates, etc.), providing a specific verb ('analyze') and resource ('sequence'). It distinguishes from siblings like 'get_sequence' (which likely retrieves metadata) by focusing on performance analytics, though it doesn't explicitly name alternatives.

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?

No guidance is provided on when to use this tool versus alternatives. While it implies usage for performance analysis, it doesn't specify prerequisites (e.g., needing a sequence ID), exclusions, or direct comparisons to siblings like 'analyze_list' or 'get_sequence', leaving the agent to infer 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