Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

list_contacts

Retrieve all WhatsApp Business contacts for a specified instance to manage messaging and communication workflows.

Instructions

List all contacts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNameYesInstance name

Implementation Reference

  • The main handler function for the 'list_contacts' tool. It fetches contacts from the EvolutionAPI service for the given instance and returns them as a JSON-formatted text content block.
    private async handleListContacts(args: any) {
      const contacts = await evolutionAPI.findContacts(args.instanceName);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(contacts, null, 2)
          }
        ]
      };
    }
  • Defines the tool schema for 'list_contacts', specifying the input schema that requires an 'instanceName' parameter.
    {
      name: 'list_contacts',
      description: 'List all contacts',
      inputSchema: {
        type: 'object',
        properties: {
          instanceName: { type: 'string', description: 'Instance name' }
        },
        required: ['instanceName']
      }
    },
  • src/index.ts:524-525 (registration)
    Registers the 'list_contacts' tool in the switch statement within the CallToolRequest handler, dispatching to the specific handler method.
    case 'list_contacts':
      return await this.handleListContacts(args);

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations exist, so the description must disclose behavior. It only says 'List all contacts', with no mention of read-only nature, pagination, rate limits, or return value format. The safe read operation is implied but not confirmed.

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

Conciseness3/5

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

The description is a single brief sentence, making it front-loaded but under-specified. It lacks important details that could be added without losing conciseness.

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 simple tool with one parameter and no output schema, the description should at least hint at the return format or behavior. It does not, leaving the agent without complete context.

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 coverage is 100% for the single parameter. The description adds no further meaning beyond what the schema provides ('Instance name'). Baseline of 3 applies.

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 states 'List all contacts', clearly indicating the verb and resource. It distinguishes from sibling tools like list_groups or list_instances. However, the scope ('all contacts' vs. per instance) is ambiguous given the required instanceName parameter.

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 vs. alternatives such as search or filter operations. No prerequisites or exclusions are mentioned.

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