waha_get_group_join_info
Retrieve WhatsApp group details from invite links to preview information before joining.
Instructions
Get group information from invite link without joining.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Invite code or full URL |
Implementation Reference
- src/index.ts:2329-2346 (handler)MCP tool handler that extracts the invite code from arguments, validates it, calls the WAHA client getGroupJoinInfo method, and formats the response as MCP content.private async handleGetGroupJoinInfo(args: any) { const code = args.code; if (!code) { throw new Error("code is required"); } const result = await this.wahaClient.getGroupJoinInfo(code); return { content: [ { type: "text", text: `Group information:\n${JSON.stringify(result, null, 2)}`, }, ], }; }
- src/index.ts:813-825 (schema)Input schema definition for the waha_get_group_join_info tool, specifying the required 'code' parameter.name: "waha_get_group_join_info", description: "Get group information from invite link without joining.", inputSchema: { type: "object", properties: { code: { type: "string", description: "Invite code or full URL", }, }, required: ["code"], }, },
- src/index.ts:1127-1128 (registration)Tool registration in the CallToolRequestSchema switch statement, dispatching to the specific handler.case "waha_set_group_messages_admin_only": return await this.handleSetGroupMessagesAdminOnly(args);
- src/client/waha-client.ts:1142-1154 (helper)WAHA client method that makes the actual API request to retrieve group join information using the provided invite code.async getGroupJoinInfo(code: string): Promise<any> { if (!code) { throw new WAHAError("code is required"); } const queryParams = { code }; const queryString = this.buildQueryString(queryParams); const endpoint = `/api/${this.session}/groups/join-info${queryString}`; return this.request<any>(endpoint, { method: "GET", }); }