Skip to main content
Glama

waha_create_group

Create a new WhatsApp group by specifying a group name and participant list in JSON format.

Instructions

Create a new WhatsApp group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesGroup name
participantsYesJSON array of participants (format: [{'id': 'number@c.us'}, ...])

Implementation Reference

  • MCP tool handler for 'waha_create_group'. Validates input arguments, parses participants JSON, calls WAHAClient.createGroup, and returns formatted success response with group details.
    private async handleCreateGroup(args: any) {
      const name = args.name;
      const participantsStr = args.participants;
    
      if (!name) {
        throw new Error("name is required");
      }
    
      if (!participantsStr) {
        throw new Error("participants is required");
      }
    
      const participants = JSON.parse(participantsStr);
    
      const result = await this.wahaClient.createGroup({
        name,
        participants,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Successfully created group "${name}".\nGroup details:\n${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
    }
  • Input schema definition for the 'waha_create_group' tool, specifying required 'name' and 'participants' (as JSON string).
      name: "waha_create_group",
      description: "Create a new WhatsApp group.",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Group name",
          },
          participants: {
            type: "string",
            description: "JSON array of participants (format: [{'id': 'number@c.us'}, ...])",
          },
        },
        required: ["name", "participants"],
      },
    },
  • src/index.ts:1101-1102 (registration)
    Tool execution registration in the CallToolRequestSchema switch statement, dispatching to handleCreateGroup.
    case "waha_create_group":
      return await this.handleCreateGroup(args);
  • WAHAClient helper method that performs the actual HTTP POST request to WAHA API endpoint /api/{session}/groups to create the group.
    async createGroup(params: {
      name: string;
      participants: Array<{ id: string }>;
    }): Promise<any> {
      const { name, participants } = params;
    
      if (!name) {
        throw new WAHAError("name is required");
      }
    
      if (!participants || participants.length === 0) {
        throw new WAHAError("participants array is required");
      }
    
      const body = { name, participants };
    
      return this.request<any>(`/api/${this.session}/groups`, {
        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 states the tool creates a group but fails to mention critical behavioral aspects: required permissions (e.g., admin rights), side effects (e.g., notifications to participants), error conditions (e.g., invalid participant format), or what happens on success (e.g., returns group ID). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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, direct sentence with no wasted words. It front-loads the core action ('Create a new WhatsApp group') and avoids unnecessary elaboration. This efficiency makes it easy for an agent to parse and understand the tool's purpose 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?

For a tool that performs a mutation (creating a group) with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., permissions, side effects), error handling, and return values. While the schema covers parameters, the overall context is insufficient for safe and effective use by an AI agent, especially given the complexity of group creation in messaging platforms.

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 both parameters ('name' and 'participants') documented in the schema. The description adds no additional semantic context beyond what the schema provides, such as examples or constraints (e.g., name length limits, participant validation rules). Given the high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 ('Create') and resource ('new WhatsApp group'), making the purpose immediately understandable. It distinguishes from siblings like 'waha_join_group' or 'waha_update_group_subject' by specifying creation rather than modification or joining. However, it doesn't explicitly contrast with all siblings, such as 'waha_get_groups' (read vs. write), which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing admin rights or valid participants), exclusions (e.g., not for updating existing groups), or direct comparisons to siblings like 'waha_join_group' for joining existing groups. This lack of contextual advice leaves the agent to infer usage from the tool name 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/seejux/waha-whatsapp-mcp'

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