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), }); }

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-mcp'

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