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
| Name | Required | Description | Default |
|---|---|---|---|
| sender_id | Yes | ID of the sender identity to delete |
Implementation Reference
- src/tools/contacts.ts:471-481 (handler)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.` }] }; },
- src/tools/contacts.ts:464-470 (schema)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"), }, },
- src/tools/contacts.ts:463-482 (registration)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.` }] }; }, },
- src/tools/index.ts:3-17 (registration)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); }