Skip to main content
Glama

waha_get_group_participants

Retrieve a list of all members in a WhatsApp group using the group ID to manage group participants and interactions.

Instructions

List all members in a group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYesGroup ID (format: number@g.us)

Implementation Reference

  • The handler function that implements the core logic for the 'waha_get_group_participants' MCP tool. It extracts the groupId from arguments, validates it, calls the WAHA client to fetch participants, formats the response as JSON, and returns it in the MCP format.
    private async handleGetGroupParticipants(args: any) {
      const groupId = args.groupId;
    
      if (!groupId) {
        throw new Error("groupId is required");
      }
    
      const participants = await this.wahaClient.getGroupParticipants(groupId);
    
      return {
        content: [
          {
            type: "text",
            text: `Group ${groupId} participants (${participants.length}):\n${JSON.stringify(participants, null, 2)}`,
          },
        ],
      };
    }
  • src/index.ts:685-696 (registration)
    Tool registration in the ListTools handler. Defines the tool name, description, and input schema requiring a 'groupId' parameter.
    name: "waha_get_group_participants",
    description: "List all members in a group.",
    inputSchema: {
      type: "object",
      properties: {
        groupId: {
          type: "string",
          description: "Group ID (format: number@g.us)",
        },
      },
      required: ["groupId"],
    },
  • Input schema definition for the tool, specifying the required 'groupId' string parameter.
      type: "object",
      properties: {
        groupId: {
          type: "string",
          description: "Group ID (format: number@g.us)",
        },
      },
      required: ["groupId"],
    },
  • WAHAClient helper method that performs the actual HTTP GET request to the WAHA API endpoint for retrieving group participants.
    async getGroupParticipants(groupId: string): Promise<any[]> {
      if (!groupId) {
        throw new WAHAError("groupId is required");
      }
    
      const endpoint = `/api/${this.session}/groups/${encodeURIComponent(groupId)}/participants`;
    
      return this.request<any[]>(endpoint, {
        method: "GET",
      });
    }
  • src/index.ts:1109-1110 (registration)
    Dispatch in the CallToolRequestSchema switch statement that routes calls to the specific handler.
    case "waha_get_group_participants":
      return await this.handleGetGroupParticipants(args);
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 it 'lists' members without disclosing behavioral traits. It doesn't mention whether this requires specific permissions, rate limits, pagination behavior, or what format the output takes (e.g., list of contacts with details). For a read operation with zero annotation coverage, this is insufficient.

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 that gets straight to the point with no wasted words. It's appropriately sized for a simple list operation and front-loads the core functionality.

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 tool with no annotations and no output schema, the description is too minimal. It doesn't explain what 'members' means (e.g., are they contacts with specific attributes?), doesn't mention potential limitations or errors, and provides no context about the return format. Given the lack of structured data, more descriptive content would be helpful.

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 single parameter 'groupId' fully documented in the schema. The description doesn't add any parameter-specific information beyond what's already in the structured schema, so it meets the baseline for high schema coverage.

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 clearly states the action ('List all members') and resource ('in a group'), making the purpose immediately understandable. It distinguishes from siblings like 'waha_get_group_info' or 'waha_get_groups' by focusing specifically on participants, though it doesn't explicitly contrast with them.

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. While the name implies it's for retrieving group participants, there's no mention of prerequisites, limitations, or comparison to similar tools like 'waha_get_group_info' which might also provide participant data.

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/seejux/waha-whatsapp-mcp'

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