Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Open Template Editor

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
NameRequiredDescriptionDefault
template_idNoTemplate ID to open (opens template list if not provided)

Implementation Reference

  • 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.'}`,
          },
        ],
      };
    },
  • 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)"),
      },
    },
  • 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.'}`,
            },
          ],
        };
      },
    },
  • Top-level registration where templateTools (containing open_template_editor) is spread into allTools export.
    export const allTools = {
      ...automationTools,
      ...campaignTools,
      ...contactTools,
      ...mailTools,
      ...miscTools,
      ...statsTools,
      ...templateTools,
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but provides minimal behavioral disclosure. It mentions opening in a browser but doesn't specify whether this launches a new window/tab, requires user authentication, has rate limits, or what happens after opening. For a tool that likely involves UI navigation and potential user interaction, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and context. Every word serves a purpose with no redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and a simple single-parameter input schema, the description provides basic purpose but lacks important behavioral context. It doesn't explain what 'opens template list if not provided' means in practice or what the user experience entails after the browser opens.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description doesn't explicitly mention parameters, but with 100% schema description coverage and only one optional parameter, the schema adequately documents the template_id parameter. The description's focus on opening the editor (with or without a template) aligns with the parameter's optional nature, providing adequate context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Open'), target resource ('SendGrid template editor'), and context ('in browser for visual editing'). It distinguishes itself from sibling tools like 'get_template' or 'update_template' by focusing on UI interaction rather than API operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('in browser for visual editing'), suggesting this tool is for manual UI work rather than automated API calls. However, it doesn't explicitly state when to use this vs alternatives like 'get_template' for programmatic access or 'update_template' for direct API updates.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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