delete_list
Remove a contact list from SendGrid's email marketing platform by specifying its ID to manage subscriber data.
Instructions
Delete a contact list from SendGrid
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list_id | Yes | ID of the contact list to delete |
Implementation Reference
- src/services/sendgrid.ts:102-107 (handler)The core handler function in SendGridService that performs the API call to delete a marketing contact list by its ID.async deleteList(listId: string): Promise<void> { await this.client.request({ method: 'DELETE', url: `/v3/marketing/lists/${listId}` }); }
- src/tools/index.ts:230-243 (registration)The tool registration definition including name, description, and input schema for the 'delete_list' tool in getToolDefinitions.{ name: 'delete_list', description: 'Delete a contact list from SendGrid', inputSchema: { type: 'object', properties: { list_id: { type: 'string', description: 'ID of the contact list to delete' } }, required: ['list_id'] } },
- src/tools/index.ts:446-448 (handler)The switch case handler in handleToolCall that invokes the service.deleteList method and returns a success message.case 'delete_list': await service.deleteList(args.list_id); return { content: [{ type: 'text', text: `Contact list ${args.list_id} deleted successfully` }] };
- src/tools/index.ts:233-241 (schema)The input schema definition for the 'delete_list' tool, specifying the required 'list_id' parameter.inputSchema: { type: 'object', properties: { list_id: { type: 'string', description: 'ID of the contact list to delete' } }, required: ['list_id']