Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

list_groups

Retrieve all WhatsApp groups from an Evolution API instance, with option to include participant details for group management.

Instructions

List all groups

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
getParticipantsNoInclude participants list
instanceNameYesInstance name

Implementation Reference

  • The asynchronous handler function for the 'list_groups' MCP tool. It extracts instanceName and getParticipants from args, calls evolutionAPI.findGroups, and returns the result formatted as MCP text content.
    private async handleListGroups(args: any) {
      const groups = await evolutionAPI.findGroups(args.instanceName, args.getParticipants);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(groups, null, 2)
          }
        ]
      };
    }
  • Schema definition and registration for the 'list_groups' tool in the tools array provided to the MCP ListToolsRequestHandler.
    {
      name: 'list_groups',
      description: 'List all groups',
      inputSchema: {
        type: 'object',
        properties: {
          instanceName: { type: 'string', description: 'Instance name' },
          getParticipants: { type: 'boolean', description: 'Include participants list' }
        },
        required: ['instanceName']
      }
  • src/index.ts:532-533 (registration)
    Switch case in the MCP CallToolRequestHandler that dispatches 'list_groups' tool calls to the specific handler method.
    case 'list_groups':
      return await this.handleListGroups(args);
  • Supporting utility in EvolutionAPI service that makes the HTTP GET request to the backend /group/findGroups endpoint to retrieve the list of groups, invoked by the tool handler.
    async findGroups(instanceName: string, getParticipants?: boolean): Promise<Group[]> {
      const response = await this.client.get(`/group/findGroups/${instanceName}`, {
        params: { getParticipants }
      });
      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 the full burden. It only states the action ('List all groups') without disclosing behavioral traits such as pagination, rate limits, authentication needs, error handling, or what 'list' entails (e.g., returns metadata only). This is inadequate for a tool with no annotation coverage.

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 extremely concise ('List all groups') with zero wasted words, making it front-loaded and easy to parse. Every word earns its place, though this brevity contributes to gaps 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 no annotations, no output schema, and a simple input schema, the description is incomplete. It lacks context on what 'groups' are, how they relate to instances or participants, and what the output includes, making it insufficient for an agent to use the tool effectively without external knowledge.

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 clear parameter descriptions in the schema (e.g., 'Include participants list' for getParticipants). The description adds no parameter semantics beyond the schema, so it meets the baseline of 3 for high schema coverage without compensating value.

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 'List all groups' states a clear verb ('List') and resource ('groups'), but it's vague about scope and lacks differentiation from sibling tools like 'list_contacts' or 'list_instances'. It doesn't specify what 'all' entails (e.g., all groups in a workspace, instance, or globally).

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. It doesn't mention prerequisites (e.g., needing an instance), exclusions, or comparisons to siblings like 'get_chats' or 'list_contacts', leaving the agent to infer usage from context 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