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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Sequence ID to analyze |
Implementation Reference
- src/index.ts:844-896 (handler)Core handler function that executes the analyze_sequence tool. Fetches sequence details from Apollo API endpoint `/emailer_campaigns/{id}` and generates a formatted analysis report including overview, performance metrics (bounce, reply, open, click rates), step-by-step breakdown, and automated 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:327-339 (schema)Input schema definition for the analyze_sequence tool, specifying required 'id' parameter of type string (sequence ID). Part of the tools registration in getTools() method.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"], },
- src/index.ts:76-77 (registration)Dispatch/registration case in the main tool request handler switch statement that routes 'analyze_sequence' calls to the analyzeSequence method.case "analyze_sequence": return await this.analyzeSequence(args);