Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Update Email List

update_email_list

Update an existing email list's name by providing its ID and a new name.

Instructions

Update the properties of an existing email list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesID of the email list to update
nameYesNew name for the email list

Implementation Reference

  • Handler function that executes the update_email_list logic. Makes a PATCH request to SendGrid's marketing lists API with the list_id and new name.
    handler: async ({ list_id, name }: { list_id: string; name: string }): Promise<ToolResult> => {
      const readOnlyCheck = checkReadOnlyMode();
      if (readOnlyCheck.blocked) {
        return { content: [{ type: "text", text: readOnlyCheck.message! }] };
      }
      
      const result = await makeRequest(`https://api.sendgrid.com/v3/marketing/lists/${list_id}`, {
        method: "PATCH",
        body: JSON.stringify({ name }),
      });
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    },
  • Schema definition for update_email_list: title, description, and inputSchema (list_id and name as required strings).
    update_email_list: {
      config: {
        title: "Update Email List",
        description: "Update the properties of an existing email list",
        inputSchema: {
          list_id: z.string().describe("ID of the email list to update"),
          name: z.string().describe("New name for the email list"),
        },
      },
  • Registration of contactTools (which includes update_email_list) into the allTools export object.
    export const allTools = {
      ...automationTools,
      ...campaignTools,
      ...contactTools,
      ...mailTools,
      ...miscTools,
      ...statsTools,
      ...templateTools,
    };
  • src/index.ts:20-23 (registration)
    Tool registration loop that registers all tools (including update_email_list) with the MCP server via server.registerTool().
    // Register all tools
    for (const [name, tool] of Object.entries(allTools)) {
      server.registerTool(name, tool.config as any, tool.handler as any);
    }
  • Imports used by the update_email_list handler: zod for validation, makeRequest for API calls, ToolResult type, and checkReadOnlyMode for read-only guard.
    import { z } from "zod";
    import { makeRequest } from "../shared/api.js";
    import { ContactSchema, ToolResult } from "../shared/types.js";
    import { checkReadOnlyMode } from "../shared/env.js";
Behavior2/5

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

No annotations are provided, so the description must convey behavioral traits. It only states 'Update the properties', which implies mutation but does not disclose side effects, required permissions, or reversibility. For a mutation tool with zero annotation coverage, 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 with no redundant information. Every word earns its place.

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

Completeness2/5

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

Given the lack of output schema and annotations, the description is too minimal. It does not explain return values, error handling, or success indicators, leaving the agent with insufficient context for a mutation tool.

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

Parameters3/5

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

The input schema covers 100% of parameters with descriptions, so the schema already explains the parameters adequately. The description adds no extra meaning beyond what the schema provides, earning a baseline score of 3.

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

Purpose4/5

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

The description clearly states the action 'Update' and the resource 'email list'. It effectively communicates the tool's purpose, but does not differentiate it from sibling tools like create_email_list or delete_email_list.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It lacks context on prerequisites, such as requiring an existing list, or any conditions that might make other tools more appropriate.

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