Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Delete Template

delete_template

Remove a template and all its versions from SendGrid to clean up unused email designs and maintain organized templates.

Instructions

Delete a template and all its versions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
template_idYesID of the template to delete

Implementation Reference

  • The handler function that implements the core logic of deleting a template via SendGrid API, including read-only mode check.
    handler: async ({ template_id }: { template_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/templates/${template_id}`, {
        method: "DELETE",
      });
      return { content: [{ type: "text", text: `Template ${template_id} deleted successfully.` }] };
    },
  • Tool configuration with title, description, and Zod input schema defining the required 'template_id' parameter.
    config: {
      title: "Delete Template",
      description: "Delete a template and all its versions",
      inputSchema: {
        template_id: z.string().describe("ID of the template to delete"),
      },
    },
  • Includes templateTools (containing delete_template) in the allTools object by spreading it.
    ...templateTools,
  • src/index.ts:21-23 (registration)
    Registers all tools from allTools, including 'delete_template', with the MCP server instance.
    for (const [name, tool] of Object.entries(allTools)) {
      server.registerTool(name, tool.config as any, tool.handler as any);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool deletes a template and all versions, implying a destructive, irreversible operation. However, it doesn't mention permissions required, confirmation steps, error conditions, or what happens to associated data. For a destructive tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core functionality without unnecessary words. It's appropriately sized for a simple deletion tool and front-loads the essential information. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive deletion tool with no annotations and no output schema, the description is incomplete. It doesn't address important contextual aspects like what 'delete' means (permanent? reversible?), what happens to data using the template, error responses, or confirmation requirements. The description should provide more behavioral context given the tool's destructive nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'template_id' fully documented in the schema. The description adds no additional parameter semantics beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('template and all its versions'), making the purpose unambiguous. It distinguishes from sibling tools like 'delete_template_version' by specifying it deletes all versions, not just one. However, it doesn't explicitly contrast with other deletion tools like 'delete_contact' or 'delete_sender'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. While it implies deletion of entire templates (vs. 'delete_template_version' for single versions), it doesn't mention prerequisites, irreversible consequences, or when to choose other deletion tools like 'delete_contact'. The description lacks explicit usage context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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