open_template_editor
Open the SendGrid template editor in your browser to visually create or 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 'open_template_editor' tool. Generates a browser URL to SendGrid's dynamic template editor (for specific template or the list) and instructs user to open it.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)Configuration and input schema (Zod) for the 'open_template_editor' tool, 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/templates.ts:402-424 (registration)Full tool registration as part of templateTools export, including config, schema, and handler.open_template_editor: { 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)"), }, }, 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/index.ts:9-17 (registration)Top-level registration where templateTools (containing open_template_editor) is spread into allTools export.export const allTools = { ...automationTools, ...campaignTools, ...contactTools, ...mailTools, ...miscTools, ...statsTools, ...templateTools, };