Skip to main content
Glama
Garoth

SendGrid MCP Server

by Garoth

delete_template

Remove a dynamic email template from SendGrid by specifying its template ID to manage your email marketing content.

Instructions

Delete a dynamic template from SendGrid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
template_idYesID of the template to delete

Implementation Reference

  • Core implementation of the delete_template tool: sends a DELETE request to the SendGrid Templates API endpoint to delete the specified template.
    async deleteTemplate(templateId: string): Promise<void> {
      await this.client.request({
        method: 'DELETE',
        url: `/v3/templates/${templateId}`
      });
    }
  • Tool registration/definition including name, description, and input schema for delete_template.
    {
      name: 'delete_template',
      description: 'Delete a dynamic template from SendGrid',
      inputSchema: {
        type: 'object',
        properties: {
          template_id: {
            type: 'string',
            description: 'ID of the template to delete'
          }
        },
        required: ['template_id']
      }
    },
  • Dispatcher case in handleToolCall function that invokes the deleteTemplate service method and formats the response.
    case 'delete_template':
      await service.deleteTemplate(args.template_id);
      return { content: [{ type: 'text', text: `Template ${args.template_id} deleted successfully` }] };

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/Garoth/sendgrid-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server