Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

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
NameRequiredDescriptionDefault
singlesend_idYesThe single send ID to view stats for

Implementation Reference

  • 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`, }, ], }; },
  • 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"), }, },
  • 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); }

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/deyikong/sendgrid-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server