Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

delete_template

Remove a custom WhatsApp Business message template by its ID to manage your template library and maintain relevant messaging content.

Instructions

Delete a custom template

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
templateIdYesTemplate ID to delete

Implementation Reference

  • MCP tool handler function that invokes the template service to delete a template by ID and returns a success or failure message in the required MCP content format.
    private async handleDeleteTemplate(args: any) {
      const deleted = await templateService.deleteTemplate(args.templateId);
      return {
        content: [
          {
            type: 'text',
            text: deleted ? 'Template deleted successfully' : 'Cannot delete default template or template not found'
          }
        ]
      };
    }
  • src/index.ts:264-274 (registration)
    Tool registration entry in the tools array provided to the MCP ListTools handler, including name, description, and input schema.
    {
      name: 'delete_template',
      description: 'Delete a custom template',
      inputSchema: {
        type: 'object',
        properties: {
          templateId: { type: 'string', description: 'Template ID to delete' }
        },
        required: ['templateId']
      }
    },
  • Input schema definition for the delete_template tool, specifying the required templateId parameter.
    inputSchema: {
      type: 'object',
      properties: {
        templateId: { type: 'string', description: 'Template ID to delete' }
      },
      required: ['templateId']
  • TemplateService method that performs the actual deletion: checks if not default, removes from internal Map, saves to storage, returns boolean success.
    async deleteTemplate(id: string): Promise<boolean> {
      // Don't delete default templates
      if (DEFAULT_TEMPLATES.find(t => t.id === id)) {
        return false;
      }
    
      const deleted = this.templates.delete(id);
      if (deleted) {
        await this.saveCustomTemplates();
      }
      return deleted;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without behavioral details. It doesn't disclose if deletion is permanent, requires specific permissions, has side effects (e.g., affecting related instances), or rate limits, which is inadequate for a destructive operation.

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 with zero wasted words. It's front-loaded with the core action and resource, making it immediately scannable and appropriately sized for the tool's simplicity.

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 tool with no annotations and no output schema, the description is incomplete. It lacks critical context like irreversible effects, error handling, or return values, which are essential for safe agent invocation given the tool's complexity and potential impact.

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?

The schema description coverage is 100%, with the single parameter 'templateId' clearly documented in the schema. The description adds no additional meaning beyond what's in the schema (e.g., format examples or constraints), so it meets the baseline for high coverage without extra value.

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 'Delete a custom template' clearly states the action (delete) and the resource (custom template), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'delete_instance' or 'update_template' that also involve template operations, which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing template), exclusions, or comparisons to siblings like 'delete_instance' or 'update_template', leaving the agent with no context for selection.

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/luiso2/mcp-evolution-api'

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