Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

delete_instance

Remove a WhatsApp Business instance to manage messaging resources and maintain clean API environments.

Instructions

Delete a WhatsApp instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNameYesInstance name to delete

Implementation Reference

  • The main MCP tool handler for 'delete_instance'. Extracts instanceName from input arguments, delegates to evolutionAPI.deleteInstance, and returns the result as MCP-formatted text content (JSON string).
    private async handleDeleteInstance(args: any) {
      const result = await evolutionAPI.deleteInstance(args.instanceName);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • src/index.ts:86-96 (registration)
    Tool registration definition in the global tools array. Includes name, description, and input schema. This array is provided to the MCP ListToolsRequestHandler.
    {
      name: 'delete_instance',
      description: 'Delete a WhatsApp instance',
      inputSchema: {
        type: 'object',
        properties: {
          instanceName: { type: 'string', description: 'Instance name to delete' }
        },
        required: ['instanceName']
      }
    },
  • JSON schema for input validation: requires 'instanceName' string.
    inputSchema: {
      type: 'object',
      properties: {
        instanceName: { type: 'string', description: 'Instance name to delete' }
      },
      required: ['instanceName']
    }
  • Helper method in EvolutionAPI class that makes the HTTP DELETE request to the backend Evolution API endpoint `/instance/delete/{instanceName}` and returns the response.
    async deleteInstance(instanceName: string): Promise<{ status: string }> {
      const response = await this.client.delete(`/instance/delete/${instanceName}`);
      return response.data;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations provided; description only states 'Delete a WhatsApp instance'. Does not disclose side effects like data loss, irreversibility, or prerequisites (e.g., instance must exist). Minimal behavioral context.

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?

Single sentence, front-loaded, no wasted words. Appropriate length for a simple deletion tool.

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

Completeness3/5

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

Given low complexity (1 param, no output schema), description is minimal but sufficient for basic understanding. Could mention permanence or need for existing instance to improve completeness.

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% for the sole parameter 'instanceName' with description 'Instance name to delete'. Description adds no value beyond schema; baseline of 3 applies.

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

Purpose5/5

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

Description clearly states 'Delete a WhatsApp instance' with specific verb (delete) and resource (WhatsApp instance). Distinguishes from siblings like create_instance, connect_instance, list_instances.

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 on when to use this tool versus alternatives such as disabling an instance or removing in parts. Implied usage is straightforward, but lacks explicit context or exclusions.

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