open_single_send_stats
View detailed performance metrics for a specific SendGrid email campaign to analyze engagement and 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 constructs a URL using the provided singlesend_id and returns a ToolResult with a text message instructing the user to open it in their 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:41-43 (schema)Zod input schema defining the required 'singlesend_id' string parameter.inputSchema: { singlesend_id: z.string().describe("The single send ID to view stats for"), },
- src/tools/campaigns.ts:37-55 (registration)Local registration of the 'open_single_send_stats' tool within the campaignTools export.open_single_send_stats: { 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"), }, }, 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/index.ts:9-17 (registration)Global registration by spreading campaignTools (which includes open_single_send_stats) into the allTools export used for MCP tools.export const allTools = { ...automationTools, ...campaignTools, ...contactTools, ...mailTools, ...miscTools, ...statsTools, ...templateTools, };