delete_sender
Remove a verified sender identity from your SendGrid account to manage authorized email senders and maintain sender reputation.
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 read-only mode, then sends a DELETE request to SendGrid's verified_senders endpoint to delete the specified 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)The tool's configuration, including title, description, and input schema defining the 'sender_id' parameter with Zod validation.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 'delete_sender' tool definition object, exported as part of contactTools, which is included in allTools and registered via MCP server.registerTool in src/index.ts.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.` }] }; }, },