Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Update Email List

update_email_list

Modify an existing email list's properties like name to maintain accurate contact segmentation for targeted email campaigns.

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

  • The handler function executes the tool logic: checks read-only mode, performs a PATCH request to the SendGrid API to update the email list's name, and returns the JSON result.
    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) }] };
    },
  • The tool configuration including title, description, and Zod inputSchema for parameters list_id and name.
    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"),
      },
    },
  • src/index.ts:21-23 (registration)
    Generic registration loop that registers all tools from allTools, including update_email_list, to the MCP server.
    for (const [name, tool] of Object.entries(allTools)) {
      server.registerTool(name, tool.config as any, tool.handler as any);
    }
  • Aggregation of all tool objects into allTools, including contactTools which contains update_email_list.
    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 the full burden of behavioral disclosure. It states 'Update' implies mutation but doesn't cover critical aspects like required permissions, whether changes are reversible, error handling, or response format. This is inadequate for a mutation tool with zero annotation coverage.

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 wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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 this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks behavioral details (e.g., side effects, permissions), usage context, and output information, which are essential for safe and effective tool invocation.

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?

Schema description coverage is 100%, so the schema fully documents both parameters (list_id and name). The description adds no additional meaning beyond the schema, such as format constraints or examples. Baseline 3 is appropriate when the schema handles parameter documentation effectively.

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 resource ('properties of an existing email list'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'update_contact' or 'update_template', which follow the same pattern, so it lacks specific distinction.

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 doesn't mention prerequisites (e.g., needing an existing list ID), exclusions, or comparisons to siblings like 'create_email_list' or 'delete_email_list', leaving usage context unclear.

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