Skip to main content
Glama

waha_promote_group_admin

Promote participants to group administrator roles in WhatsApp groups using admin privileges. Specify group ID and participant list to grant administrative permissions.

Instructions

Promote participant(s) to group admin. Requires admin privileges.

Input Schema

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

Implementation Reference

  • src/index.ts:735-751 (registration)
    Tool schema and registration in the listTools response. Defines input schema requiring groupId and participants as JSON string.
    name: "waha_promote_group_admin", description: "Promote participant(s) to group admin. 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 promote (format: [{'id': 'number@c.us'}, ...])", }, }, required: ["groupId", "participants"], }, },
  • Main tool handler. Parses input arguments, validates, calls WAHA client promoteGroupAdmin method, and formats success response.
    private async handlePromoteGroupAdmin(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.promoteGroupAdmin({ groupId, participants, }); return { content: [ { type: "text", text: `Successfully promoted ${participants.length} participant(s) to admin in group ${groupId}.\n${JSON.stringify(result, null, 2)}`, }, ], }; }
  • WAHA client helper method that makes the actual HTTP POST request to WAHA API to promote participants to group admins.
    async promoteGroupAdmin(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)}/admin/promote`; const body = { participants }; return this.request<any>(endpoint, { method: "POST", 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