Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

connect_instance

Connect a WhatsApp Business instance to enable messaging through Evolution API for sending notifications, managing contacts, and handling business communications.

Instructions

Connect a WhatsApp instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNameYesInstance name to connect

Implementation Reference

  • The main MCP tool handler function for 'connect_instance'. It extracts the instanceName from args, calls evolutionAPI.connectInstance, and returns the result as a formatted JSON text response.
    private async handleConnectInstance(args: any) {
      const result = await evolutionAPI.connectInstance(args.instanceName);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • Input schema definition for the 'connect_instance' tool, specifying instanceName as required string.
    inputSchema: {
      type: 'object',
      properties: {
        instanceName: { type: 'string', description: 'Instance name to connect' }
      },
      required: ['instanceName']
    }
  • src/index.ts:64-74 (registration)
    Tool registration in the tools array, including name, description, and input schema. Used by the MCP listTools handler.
    {
      name: 'connect_instance',
      description: 'Connect a WhatsApp instance',
      inputSchema: {
        type: 'object',
        properties: {
          instanceName: { type: 'string', description: 'Instance name to connect' }
        },
        required: ['instanceName']
      }
    },
  • src/index.ts:490-491 (registration)
    Dispatcher switch case that routes 'connect_instance' tool calls to the handleConnectInstance method.
    case 'connect_instance':
      return await this.handleConnectInstance(args);
  • Helper method in EvolutionAPI service that makes the HTTP GET request to connect the WhatsApp instance via the Evolution API backend.
    async connectInstance(instanceName: string): Promise<Instance> {
      const response = await this.client.get(`/instance/connect/${instanceName}`);
      return response.data;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden but offers minimal behavioral insight. 'Connect' implies a state-changing operation, but it doesn't disclose if this requires authentication, affects instance availability, involves network calls, or has side effects like session initiation. For a mutation tool with zero annotation coverage, this is a significant gap in safety and operational 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?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool and front-loaded with the core action, though its brevity contributes to vagueness in other dimensions.

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?

Given the tool's likely complexity (connecting an instance suggests state changes or network operations), lack of annotations, no output schema, and minimal description, it's incomplete. The agent lacks critical context on behavior, outcomes, error conditions, or how this fits with sibling tools, making it inadequate for reliable use.

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 parameter 'instanceName' documented as 'Instance name to connect'. The description adds no additional meaning beyond this, such as format examples, naming conventions, or how it relates to other tools (e.g., if it must match an existing instance). Baseline 3 is appropriate since the schema does the heavy lifting.

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

Purpose3/5

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

The description 'Connect a WhatsApp instance' states the basic action (connect) and resource (WhatsApp instance), but is vague about what 'connect' means operationally. It doesn't differentiate from siblings like 'create_instance' or 'instance_status', leaving ambiguity about whether this establishes a new connection, reconnects an existing one, or performs authentication.

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. With siblings like 'create_instance', 'delete_instance', and 'instance_status', the description doesn't clarify prerequisites (e.g., must an instance exist first?), context (e.g., after creation or for reconnection), or exclusions, leaving the agent to guess based on tool names alone.

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