Skip to main content
Glama

waha_add_group_participants

Add participants to WhatsApp groups using admin privileges. Specify group ID and participant list in JSON format to manage group membership.

Instructions

Add member(s) to a group. Requires admin privileges.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYesGroup ID (format: number@g.us)
participantsYesJSON array of participants to add (format: [{'id': 'number@c.us'}, ...])

Implementation Reference

  • The main MCP tool handler function that processes the tool call, validates input, parses the participants JSON string from input, calls the underlying WAHAClient method, and returns a formatted response with the result.
    private async handleAddGroupParticipants(args: any) {
      const groupId = args.groupId;
      const participantsStr = args.participants;
    
      if (!groupId) {
        throw new Error("groupId is required");
      }
    
      if (!participantsStr) {
        throw new Error("participants is required");
      }
    
      const participants = JSON.parse(participantsStr);
    
      const result = await this.wahaClient.addGroupParticipants({
        groupId,
        participants,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Successfully added ${participants.length} participant(s) to group ${groupId}.\n${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
    }
  • src/index.ts:698-715 (registration)
    Tool registration in the list of available tools returned by ListToolsRequestSchema. Includes name, description, and input schema definition.
    {
      name: "waha_add_group_participants",
      description: "Add member(s) to a group. Requires admin privileges.",
      inputSchema: {
        type: "object",
        properties: {
          groupId: {
            type: "string",
            description: "Group ID (format: number@g.us)",
          },
          participants: {
            type: "string",
            description: "JSON array of participants to add (format: [{'id': 'number@c.us'}, ...])",
          },
        },
        required: ["groupId", "participants"],
      },
    },
  • Input schema definition for the tool, specifying required groupId and participants as JSON string.
    inputSchema: {
      type: "object",
      properties: {
        groupId: {
          type: "string",
          description: "Group ID (format: number@g.us)",
        },
        participants: {
          type: "string",
          description: "JSON array of participants to add (format: [{'id': 'number@c.us'}, ...])",
        },
      },
      required: ["groupId", "participants"],
    },
  • Underlying WAHA API client method that makes the HTTP POST request to the WAHA server endpoint /api/{session}/groups/{groupId}/participants/add to add participants to the group.
    async addGroupParticipants(params: {
      groupId: string;
      participants: Array<{ id: string }>;
    }): Promise<any> {
      const { groupId, participants } = params;
    
      if (!groupId) {
        throw new WAHAError("groupId is required");
      }
    
      if (!participants || participants.length === 0) {
        throw new WAHAError("participants array is required");
      }
    
      const endpoint = `/api/${this.session}/groups/${encodeURIComponent(groupId)}/participants/add`;
    
      const body = { participants };
    
      return this.request<any>(endpoint, {
        method: "POST",
        body: JSON.stringify(body),
      });
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the admin privilege requirement, which is useful context, but fails to describe other critical behaviors such as whether the operation is idempotent, what happens if participants already exist in the group, error conditions, or the response format. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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—two short sentences that are front-loaded with the core action and a key prerequisite. Every word earns its place, with no redundant or unnecessary information, making it efficient and easy to parse quickly.

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 complexity as a mutation operation with no annotations and no output schema, the description is insufficiently complete. It lacks details on behavioral outcomes (e.g., success/failure responses, side effects), error handling, and how it integrates with sibling tools like 'waha_get_group_participants' for verification. For a tool that modifies group membership, more context is needed to ensure safe and effective 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?

The input schema has 100% description coverage, with clear documentation for both parameters ('groupId' and 'participants'), including their formats. The description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints on participant limits. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting without extra value from the description.

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 ('Add member(s) to a group') and identifies the resource ('group'), making the purpose immediately understandable. It distinguishes from siblings like 'waha_remove_group_participants' by specifying addition rather than removal, though it doesn't explicitly mention all alternatives like 'waha_promote_group_admin' for different group management functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage context by stating 'Requires admin privileges,' which indicates a prerequisite for invocation. However, it doesn't explicitly guide when to use this tool versus alternatives like 'waha_create_group' for initial group setup or 'waha_join_group' for self-joining, leaving usage somewhat implied rather than fully specified.

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