open_single_send_stats
View detailed performance statistics for a specific SendGrid email campaign to analyze engagement metrics and track campaign effectiveness.
Instructions
Open single send stats page for a specific campaign
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| singlesend_id | Yes | The single send ID to view stats for |
Implementation Reference
- src/tools/campaigns.ts:45-54 (handler)The handler function for the 'open_single_send_stats' tool. It takes a singlesend_id and returns a message with the URL to view the stats in the browser.handler: async ({ singlesend_id }: { singlesend_id: string }): Promise<ToolResult> => { return { content: [ { type: "text", text: `Please open this URL in your browser to view stats for single send ${singlesend_id}:\nhttps://mc.sendgrid.com/single-sends/${singlesend_id}/stats?view=raw`, }, ], }; },
- src/tools/campaigns.ts:38-44 (schema)Tool configuration including title, description, and Zod input schema defining the 'singlesend_id' parameter.config: { title: "Open Single Send Stats", description: "Open single send stats page for a specific campaign", inputSchema: { singlesend_id: z.string().describe("The single send ID to view stats for"), }, },
- src/tools/index.ts:9-17 (registration)Aggregation and export of all tools by spreading individual tool groups, including campaignTools which defines 'open_single_send_stats'.export const allTools = { ...automationTools, ...campaignTools, ...contactTools, ...mailTools, ...miscTools, ...statsTools, ...templateTools, };
- src/index.ts:20-23 (registration)Dynamic registration of all tools (including 'open_single_send_stats') into the MCP server using a loop over allTools.// Register all tools for (const [name, tool] of Object.entries(allTools)) { server.registerTool(name, tool.config as any, tool.handler as any); }