get_analytics
Retrieve email analytics and statistics from GetMailer MCP Server to monitor campaign performance and track engagement metrics.
Instructions
Get email analytics and statistics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Type of analytics (summary or daily) | |
| days | No | Number of days for daily stats (default: 30) |
Implementation Reference
- src/index.ts:431-438 (handler)Handler for the 'get_analytics' tool that constructs an API request to fetch analytics data based on the provided type ('summary' or 'daily') and days parameters, then returns the JSON response as formatted text content.case 'get_analytics': { const type = args?.type || 'summary'; const days = args?.days || 30; const result = await apiRequest(`/api/analytics?type=${type}&days=${days}`); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; }
- src/index.ts:220-237 (registration)Registration of the 'get_analytics' tool in the listTools response, including its name, description, and input schema defining optional 'type' (enum: summary, daily) and 'days' (number) parameters.{ name: 'get_analytics', description: 'Get email analytics and statistics', inputSchema: { type: 'object' as const, properties: { type: { type: 'string', enum: ['summary', 'daily'], description: 'Type of analytics (summary or daily)', }, days: { type: 'number', description: 'Number of days for daily stats (default: 30)', }, }, }, },