add_participants
Add phone numbers to a WhatsApp group using Evolution API to expand group membership for business messaging and communication.
Instructions
Add participants to a group
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupJid | Yes | Group JID | |
| instanceName | Yes | Instance name | |
| participants | Yes | Phone numbers to add |
Implementation Reference
- src/index.ts:910-922 (handler)MCP tool handler for 'add_participants' that delegates to EvolutionAPI and formats the response.private async handleAddParticipants(args: any) { const result = await evolutionAPI.addGroupParticipants(args.instanceName, { groupJid: args.groupJid, participants: args.participants }); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] };
- src/index.ts:366-382 (schema)Input schema defining parameters for the add_participants tool.{ name: 'add_participants', description: 'Add participants to a group', inputSchema: { type: 'object', properties: { instanceName: { type: 'string', description: 'Instance name' }, groupJid: { type: 'string', description: 'Group JID' }, participants: { type: 'array', items: { type: 'string' }, description: 'Phone numbers to add' } }, required: ['instanceName', 'groupJid', 'participants'] } },
- src/index.ts:534-535 (registration)Registration of the tool handler in the switch case for CallToolRequest.case 'add_participants': return await this.handleAddParticipants(args);
- Helper method in EvolutionAPI that performs the HTTP POST to add participants to a group via the Evolution API backend.async addGroupParticipants(instanceName: string, data: { groupJid: string; participants: string[]; }): Promise<any> { const response = await this.client.post(`/group/addParticipants/${instanceName}`, data); return response.data; }