Skip to main content
Glama

waha_set_group_info_admin_only

Control group information editing permissions by toggling between admin-only and member access settings for WhatsApp groups.

Instructions

Toggle whether only admins can edit group info. Requires admin privileges.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYesGroup ID (format: number@g.us)
adminsOnlyYesTrue = only admins can edit, false = all members can edit

Implementation Reference

  • MCP tool handler: validates parameters, calls the WAHA client method, returns formatted success message.
    private async handleSetGroupInfoAdminOnly(args: any) {
      const groupId = args.groupId;
      const adminsOnly = args.adminsOnly;
    
      if (!groupId) {
        throw new Error("groupId is required");
      }
    
      if (adminsOnly === undefined) {
        throw new Error("adminsOnly is required");
      }
    
      await this.wahaClient.setGroupInfoAdminOnly({
        groupId,
        adminsOnly,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Successfully set group ${groupId} info editing to ${adminsOnly ? 'admins only' : 'all members'}.`,
          },
        ],
      };
    }
  • Input schema definition for the tool, specifying required groupId (string) and adminsOnly (boolean). Provided in the list of tools response.
    {
      name: "waha_set_group_info_admin_only",
      description: "Toggle whether only admins can edit group info. Requires admin privileges.",
      inputSchema: {
        type: "object",
        properties: {
          groupId: {
            type: "string",
            description: "Group ID (format: number@g.us)",
          },
          adminsOnly: {
            type: "boolean",
            description: "True = only admins can edit, false = all members can edit",
          },
        },
        required: ["groupId", "adminsOnly"],
      },
  • src/index.ts:1128-1130 (registration)
    Tool dispatch/registration in the CallToolRequestSchema switch statement, routing calls to the handler.
      return await this.handleSetGroupMessagesAdminOnly(args);
    case "waha_set_group_info_admin_only":
      return await this.handleSetGroupInfoAdminOnly(args);
  • Underlying WAHA client method that performs the actual API PUT request to toggle group info admin-only setting.
    async setGroupInfoAdminOnly(params: {
      groupId: string;
      adminsOnly: boolean;
    }): Promise<void> {
      const { groupId, adminsOnly } = params;
    
      if (!groupId) {
        throw new WAHAError("groupId is required");
      }
    
      if (adminsOnly === undefined) {
        throw new WAHAError("adminsOnly is required");
      }
    
      const endpoint = `/api/${this.session}/groups/${encodeURIComponent(groupId)}/settings/security/info-admin-only`;
    
      const body = { adminsOnly };
    
      await this.request<void>(endpoint, {
        method: "PUT",
        body: JSON.stringify(body),
      });
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the admin privilege requirement, which is a key behavioral trait, but lacks details on other aspects like rate limits, error conditions, or what happens to existing settings. It does not contradict annotations, so no contradiction flag is raised.

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 two sentences, front-loaded with the core action and followed by a prerequisite, with zero wasted words. Every sentence earns its place by providing essential information efficiently, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (a mutation with admin requirements), no annotations, and no output schema, the description is reasonably complete. It covers the purpose and prerequisites but could improve by mentioning potential side effects or response format. However, it provides enough context for basic usage without being overly sparse.

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 input schema already fully documents the parameters (groupId and adminsOnly). The description does not add any additional semantic meaning beyond what the schema provides, such as explaining parameter interactions or constraints, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Toggle'), the resource ('group info'), and the effect ('only admins can edit'), distinguishing it from siblings like waha_set_group_messages_admin_only or waha_update_group_subject. It precisely defines the tool's function without being vague or tautological.

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

Usage Guidelines4/5

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

The description provides clear context by stating 'Requires admin privileges,' which indicates when to use it based on permissions. However, it does not explicitly mention when not to use it or name alternatives among siblings, such as waha_set_group_messages_admin_only for different settings, leaving some guidance implicit rather than explicit.

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