Skip to main content
Glama

waha_update_group_subject

Change the name of a WhatsApp group by providing the group ID and new subject, enabling group management through the WAHA MCP Server.

Instructions

Change group name/subject.

Input Schema

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

Implementation Reference

  • Main handler function for waha_update_group_subject tool. Validates input, calls WAHAClient.updateGroupSubject, and returns success message.
    private async handleUpdateGroupSubject(args: any) {
      const groupId = args.groupId;
      const subject = args.subject;
    
      if (!groupId) {
        throw new Error("groupId is required");
      }
    
      if (!subject) {
        throw new Error("subject is required");
      }
    
      await this.wahaClient.updateGroupSubject({
        groupId,
        subject,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Successfully updated group ${groupId} name to "${subject}".`,
          },
        ],
      };
    }
  • Tool schema definition including input validation for groupId and subject parameters.
      name: "waha_update_group_subject",
      description: "Change group name/subject.",
      inputSchema: {
        type: "object",
        properties: {
          groupId: {
            type: "string",
            description: "Group ID (format: number@g.us)",
          },
          subject: {
            type: "string",
            description: "New group name",
          },
        },
        required: ["groupId", "subject"],
      },
    },
  • src/index.ts:1103-1106 (registration)
    Tool dispatch registration in the CallToolRequestSchema switch statement.
    case "waha_update_group_subject":
      return await this.handleUpdateGroupSubject(args);
    case "waha_update_group_description":
      return await this.handleUpdateGroupDescription(args);
  • Underlying WAHAClient helper method that performs the HTTP PUT request to update the group subject via WAHA API.
    async updateGroupSubject(params: {
      groupId: string;
      subject: string;
    }): Promise<void> {
      const { groupId, subject } = params;
    
      if (!groupId) {
        throw new WAHAError("groupId is required");
      }
    
      if (!subject) {
        throw new WAHAError("subject is required");
      }
    
      const endpoint = `/api/${this.session}/groups/${encodeURIComponent(groupId)}/subject`;
    
      const body = { subject };
    
      await this.request<void>(endpoint, {
        method: "PUT",
        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 full burden for behavioral disclosure. 'Change' implies a mutation operation, but it doesn't specify whether this requires admin permissions, if changes are reversible, what happens on failure, or any rate limits. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior and constraints.

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 with zero wasted words. It's front-loaded with the core action and resource, making it immediately understandable. Every word earns its place in conveying the essential purpose.

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 this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, side effects, or response format. While the schema covers parameters well, the overall context for safe and effective use is insufficient for a tool that modifies group data.

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%, so the schema already fully documents both parameters (groupId and subject). The description adds no additional parameter semantics beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in 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 ('Change') and the target resource ('group name/subject'), making the purpose immediately understandable. It distinguishes this from sibling tools like waha_create_group or waha_update_group_description by focusing specifically on the group subject/name. However, it doesn't specify that this is for WhatsApp groups (though implied by context), keeping it from 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 permissions), when not to use it, or how it differs from related tools like waha_set_group_info_admin_only or waha_update_group_description. The agent must 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