Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Delete Sender Identity

delete_sender

Remove a verified sender identity from your SendGrid account by providing its unique ID. This action permanently deletes the sender identity from your email configuration.

Instructions

Delete a verified sender identity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sender_idYesID of the sender identity to delete

Implementation Reference

  • The handler function for the 'delete_sender' tool. It checks for read-only mode and then sends a DELETE request to the SendGrid API to delete the verified sender identity.
    handler: async ({ sender_id }: { sender_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/verified_senders/${sender_id}`, {
        method: "DELETE",
      });
      return { content: [{ type: "text", text: `Sender identity ${sender_id} deleted successfully.` }] };
    },
  • Configuration object for the 'delete_sender' tool, including title, description, and input schema validating the sender_id parameter.
    config: {
      title: "Delete Sender Identity",
      description: "Delete a verified sender identity",
      inputSchema: {
        sender_id: z.string().describe("ID of the sender identity to delete"),
      },
    },
  • The complete definition of the 'delete_sender' tool object within the contactTools export.
    delete_sender: {
      config: {
        title: "Delete Sender Identity",
        description: "Delete a verified sender identity",
        inputSchema: {
          sender_id: z.string().describe("ID of the sender identity to delete"),
        },
      },
      handler: async ({ sender_id }: { sender_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/verified_senders/${sender_id}`, {
          method: "DELETE",
        });
        return { content: [{ type: "text", text: `Sender identity ${sender_id} deleted successfully.` }] };
      },
    },
  • Imports contactTools (which includes delete_sender) and spreads it into the allTools export used for MCP tool registration.
    import { contactTools } from "./contacts.js";
    import { mailTools } from "./mail.js";
    import { miscTools } from "./misc.js";
    import { statsTools } from "./stats.js";
    import { templateTools } from "./templates.js";
    
    export const allTools = {
      ...automationTools,
      ...campaignTools,
      ...contactTools,
      ...mailTools,
      ...miscTools,
      ...statsTools,
      ...templateTools,
    };
  • src/index.ts:21-23 (registration)
    Registers all tools from allTools (including delete_sender) with the MCP server using server.registerTool.
    for (const [name, tool] of Object.entries(allTools)) {
      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?

No annotations are provided, so the description carries full burden. It states 'Delete' implying a destructive mutation, but lacks details on permissions, reversibility, side effects, or response format. For a destructive tool with zero annotation coverage, this is a significant gap in behavioral disclosure.

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 zero waste—every word contributes to stating the tool's purpose. It's appropriately sized and front-loaded, 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 the tool's destructive nature, lack of annotations, and no output schema, the description is incomplete. It doesn't address critical aspects like confirmation needs, error handling, or what happens post-deletion, which are essential for safe and effective use in this 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 parameter 'sender_id' fully documented in the schema. The description adds no additional meaning beyond implying deletion targets a verified sender, which aligns with the schema. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 ('a verified sender identity'), making the purpose immediately understandable. However, it doesn't differentiate from sibling delete tools like delete_contact or delete_template, which follow the same pattern, so it lacks sibling distinction for 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, prerequisites (e.g., sender must be verified), or consequences. With many sibling tools, including other delete operations and list_senders, there's no indication of context or exclusions, leaving usage ambiguous.

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