remove_participants
Remove specified participants from a WhatsApp group using their phone numbers to manage group membership and maintain appropriate conversation environments.
Instructions
Remove participants from a group
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupJid | Yes | Group JID | |
| instanceName | Yes | Instance name | |
| participants | Yes | Phone numbers to remove |
Implementation Reference
- src/index.ts:925-938 (handler)The MCP tool handler function that executes the remove_participants logic by calling the EvolutionAPI service.private async handleRemoveParticipants(args: any) { const result = await evolutionAPI.removeGroupParticipants(args.instanceName, { groupJid: args.groupJid, participants: args.participants }); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
- src/index.ts:383-398 (schema)Input schema definition for the remove_participants tool.{ name: 'remove_participants', description: 'Remove participants from 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 remove' } }, required: ['instanceName', 'groupJid', 'participants'] }
- src/index.ts:536-537 (registration)Registration of the tool handler in the MCP call tool request switch statement.case 'remove_participants': return await this.handleRemoveParticipants(args);
- Helper method in EvolutionAPI service that makes the HTTP POST request to remove group participants.async removeGroupParticipants(instanceName: string, data: { groupJid: string; participants: string[]; }): Promise<any> { const response = await this.client.post(`/group/removeParticipants/${instanceName}`, data); return response.data; }