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
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | No | Template ID to open (opens template list if not provided) |
Implementation Reference
- src/tools/templates.ts:410-423 (handler)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.'}`, }, ], }; },
- src/tools/templates.ts:403-409 (schema)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)"), }, },
- src/tools/index.ts:9-17 (registration)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); }