Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

open_template_editor

Open the SendGrid template editor in your browser to visually create and modify email templates for marketing campaigns and transactional emails.

Instructions

Open the SendGrid template editor in browser for visual editing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
template_idNoTemplate ID to open (opens template list if not provided)

Implementation Reference

  • Handler function for the 'open_template_editor' tool. Constructs URL to SendGrid's dynamic template editor (specific template if template_id provided, otherwise the list page) and returns instruction to open it in browser.
    handler: async ({ template_id }: { template_id?: string }): Promise<ToolResult> => { const url = template_id ? `https://mc.sendgrid.com/dynamic-templates/${template_id}` : "https://mc.sendgrid.com/dynamic-templates"; return { content: [ { type: "text", text: `Open this URL in your browser to access the SendGrid template editor:\n${url}\n\n${template_id ? `This will open the editor for template ID: ${template_id}` : 'This will open the template management page where you can create and edit templates visually.'}`, }, ], }; },
  • Tool configuration including title, description, and Zod inputSchema defining optional 'template_id' parameter.
    config: { title: "Open Template Editor", description: "Open the SendGrid template editor in browser for visual editing", inputSchema: { template_id: z.string().optional().describe("Template ID to open (opens template list if not provided)"), }, },
  • Spreads templateTools (containing open_template_editor) into allTools object, which collects all tools for registration.
    export const allTools = { ...automationTools, ...campaignTools, ...contactTools, ...mailTools, ...miscTools, ...statsTools, ...templateTools, };
  • src/index.ts:20-23 (registration)
    Registers all tools from allTools with the MCP server, including open_template_editor via its name.
    // 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