Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Delete Email List

delete_email_list

Remove an email list from your SendGrid account to manage contacts and clean up outdated or unused mailing lists.

Instructions

Delete an existing email list from your SendGrid account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesID of the email list to delete

Implementation Reference

  • The main handler function that executes the delete_email_list tool. It checks for read-only mode, then makes a DELETE request to the SendGrid Marketing Lists API endpoint to delete the list by ID.
    handler: async ({ list_id }: { list_id: 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: "DELETE",
      });
      return { content: [{ type: "text", text: `List ${list_id} deleted successfully.` }] };
    },
  • The tool's configuration object, including title, description, and Zod input schema defining the required 'list_id' string parameter.
    config: {
      title: "Delete Email List",
      description: "Delete an existing email list from your SendGrid account",
      inputSchema: {
        list_id: z.string().describe("ID of the email list to delete"),
      },
    },
  • src/index.ts:22-23 (registration)
    The MCP server registration loop that dynamically registers the delete_email_list tool (along with all others from allTools) using its config and handler.
      server.registerTool(name, tool.config as any, tool.handler as any);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions deletion but doesn't specify whether this is reversible, what happens to associated data (e.g., contacts in the list), permission requirements, or error conditions. This leaves significant gaps for a destructive operation.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every part contributing essential information.

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?

For a destructive tool with no annotations and no output schema, the description is inadequate. It doesn't explain what 'delete' entails (permanent vs. soft delete), what gets returned (success confirmation or error), or side effects on related resources, leaving the agent with incomplete operational context.

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%, with the single parameter 'list_id' fully documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline for high schema coverage without compensating value.

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 ('Delete') and resource ('an existing email list from your SendGrid account'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'delete_contact' or 'delete_template' beyond the resource type, which prevents a perfect score.

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 like 'delete_segment' or 'update_email_list', nor does it mention prerequisites (e.g., needing the list_id from 'list_email_lists'). It simply states what the tool does without contextual usage information.

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