Delete Automation
delete_automationPermanently delete a marketing automation. This action cannot be undone; use it to remove unwanted automations.
Instructions
Permanently delete a marketing automation. This action cannot be undone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| automation_id | Yes | The automation ID to delete |
Implementation Reference
- src/tools/automations.ts:159-187 (handler)The handler function for delete_automation. Takes an automation_id, checks read-only mode, then sends a DELETE request to https://api.sendgrid.com/v3/marketing/automations/{automation_id}. Returns a success message.
delete_automation: { config: { title: "Delete Automation", description: "Permanently delete a marketing automation. This action cannot be undone.", inputSchema: { automation_id: z.string().describe("The automation ID to delete"), }, }, handler: async ({ automation_id }: { automation_id: string }): Promise<ToolResult> => { const readOnlyCheck = checkReadOnlyMode(); if (readOnlyCheck.blocked) { return { content: [{ type: "text", text: readOnlyCheck.message! }] }; } await makeRequest( `https://api.sendgrid.com/v3/marketing/automations/${automation_id}`, { method: "DELETE", } ); return { content: [{ type: "text", text: `Automation ${automation_id} deleted successfully.` }] }; }, }, - src/tools/automations.ts:160-166 (schema)Input schema for delete_automation: requires automation_id as a string.
config: { title: "Delete Automation", description: "Permanently delete a marketing automation. This action cannot be undone.", inputSchema: { automation_id: z.string().describe("The automation ID to delete"), }, }, - src/index.ts:21-23 (registration)Tool registration in the main server setup. delete_automation is registered as part of allTools which spreads automationTools from src/tools/automations.ts.
for (const [name, tool] of Object.entries(allTools)) { server.registerTool(name, tool.config as any, tool.handler as any); }