Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

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); }

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