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 using its sender ID. Keep your sender list accurate.

Instructions

Delete a verified sender identity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sender_idYesID of the sender identity to delete

Implementation Reference

  • The handler function that executes the delete_sender tool logic. It checks read-only mode, then sends a DELETE request to SendGrid's verified_senders API endpoint.
      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.` }] };
      },
    },
  • The tool configuration including title, description, and inputSchema (validates sender_id as a required string using Zod).
    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 tool is exported via contactTools which is spread into allTools in src/tools/index.ts for registration with the MCP server.
    export const allTools = {
      ...automationTools,
      ...campaignTools,
      ...contactTools,
      ...mailTools,
      ...miscTools,
      ...statsTools,
      ...templateTools,
    };
  • Imports used by delete_sender: zod for validation, makeRequest for API calls, ToolResult type, and checkReadOnlyMode for safety checks.
    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?

With no annotations provided, the description carries full burden for behavioral traits. It states 'delete' which implies destruction, but does not disclose irreversibility, permission requirements, or effects on related entities (e.g., emails using this sender).

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

Conciseness4/5

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

The description is a single sentence, front-loading the action and resource. It is concise without redundancy, though a bit more detail would not hurt.

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 simple delete tool with one parameter and no output schema, the description is minimal but functional. It does not cover behavioral side effects, return values, or confirmation steps, leaving some gaps.

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 parameter 'sender_id' is already documented. The description adds no additional meaning beyond what the schema provides, leading to 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 (delete) and the resource (verified sender identity). It is straightforward and unambiguous, though it could benefit from slightly more context about what a 'verified sender identity' entails.

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 (e.g., deactivating a sender instead of deleting, or using list_senders to find the correct ID). No exclusions or prerequisites are mentioned.

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