Overview
Group management tools provide comprehensive control over WhatsApp groups. Create groups, manage members, configure settings, and handle join requests programmatically through MCP.
whatsapp_group_create
Create a new WhatsApp group with an optional participant list.
Parameters
Parameter Type Required Description titlestring Yes Group subject/title participantsarray No Phone numbers to add during creation (without @s.whatsapp.net suffix)
Returns
Fallback text: "Created group [email protected] with 3 members"
Example Usage
Empty Group
With Participants
Direct MCP
Create a WhatsApp group named "Project Team"
Create a group named "Family" with participants 628123456789 and 628987654321
{
"name" : "whatsapp_group_create" ,
"arguments" : {
"title" : "Book Club" ,
"participants" : [ "628123456789" , "628987654321" , "628555555555" ]
}
}
Hints
Read-only : false
Destructive : true (creates new group)
Idempotent : false (creates new group each time)
Implementation Reference
Source: src/ui/mcp/group.go:40-96
whatsapp_group_join_via_link
Join a group using an invite link.
Parameters
Parameter Type Required Description invite_linkstring Yes WhatsApp group invite link
Accepted formats:
https://chat.whatsapp.com/ABC123xyz
chat.whatsapp.com/ABC123xyz
ABC123xyz (just the code)
Returns
{
"group_id" : "[email protected] " ,
"invite_link" : "https://chat.whatsapp.com/ABC123xyz"
}
Fallback text: "Joined group [email protected] "
Example Usage
Join WhatsApp group using link https://chat.whatsapp.com/ABC123xyz
Hints
Read-only : false
Destructive : true (joins group)
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:98-136
whatsapp_group_leave
Leave a WhatsApp group by its ID.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID
Returns
Example Usage
Leaving a group is permanent . You must be re-invited to rejoin.
Hints
Read-only : false
Destructive : true
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:138-172
whatsapp_group_participants
Retrieve the participant list for a group.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID
Returns
Fallback text: "Group [email protected] has 2 participants"
Participant Roles
Super Admin : Creator of the group (cannot be demoted)
Admin : Can add/remove members, change settings
Member : Regular participant
Hints
Read-only : true
Destructive : false
Idempotent : true
Implementation Reference
Source: src/ui/mcp/group.go:174-210
whatsapp_group_manage_participants
Add, remove, promote, or demote group participants.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID participantsarray Yes Phone numbers of participants to modify (without suffix) actionstring Yes Participant action: add, remove, promote, or demote
Actions
Action Description Required Role addAdd participants to group Admin removeRemove participants from group Admin promotePromote member to admin Admin demoteDemote admin to member Admin (cannot demote super admin)
Returns
{
"success" : true ,
"action" : "add" ,
"affected_count" : 2
}
Fallback text: "Applied add to 2 participants in [email protected] "
Example Usage
Add Members
Remove Members
Promote to Admin
Demote Admin
Hints
Read-only : false
Destructive : true
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:212-291
whatsapp_group_invite_link
Fetch the invite link for a group, optionally resetting it.
Parameters
Parameter Type Required Default Description group_idstring Yes - Group JID or numeric ID resetboolean No falseIf true, reset the invite link (invalidates old link)
Returns
{
"invite_link" : "https://chat.whatsapp.com/ABC123xyz"
}
Fallback text: "Invite link for [email protected] : https://chat.whatsapp.com/ABC123xyz"
Reset Behavior
When reset: true:
Old invite link is invalidated
New invite link is generated
Anyone with old link can no longer join
Example Usage
Hints
Read-only : false
Destructive : true (when reset=true)
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:293-347
whatsapp_group_info
Retrieve detailed WhatsApp group information.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID
Returns
{
"group_id" : "[email protected] " ,
"name" : "Project Team" ,
"topic" : "Discuss project updates and deadlines" ,
"owner" : "[email protected] " ,
"created_at" : "2026-01-15T10:00:00Z" ,
"participant_count" : 15 ,
"is_locked" : false ,
"is_announce" : false
}
Group Settings
is_locked : If true, only admins can edit group info
is_announce : If true, only admins can send messages
Hints
Read-only : true
Destructive : false
Idempotent : true
Implementation Reference
Source: src/ui/mcp/group.go:349-385
whatsapp_group_set_name
Update the group’s display name.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID namestring Yes New group name
Returns
Example Usage
Hints
Read-only : false
Destructive : true
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:387-430
whatsapp_group_set_topic
Update the group’s topic or description.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID topicstring Yes New group topic/description
Returns
Example Usage
Hints
Read-only : false
Destructive : true
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:432-475
whatsapp_group_set_locked
Toggle whether only admins can edit group info.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID lockedboolean Yes Set to true to lock the group
Locked State
When locked: true:
Only admins can change group name
Only admins can change group icon
Only admins can change group description
When locked: false:
All participants can edit group info
Returns
Example Usage
Hints
Read-only : false
Destructive : true
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:477-535
whatsapp_group_set_announce
Toggle announcement-only mode.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID announceboolean Yes Set to true to allow only admins to send messages
Announce Mode
When announce: true:
Only admins can send messages
Regular members can only read messages
Useful for broadcast/announcement groups
When announce: false:
All participants can send messages
Regular group chat behavior
Returns
Example Usage
Enable Announce
Disable Announce
Hints
Read-only : false
Destructive : true
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:537-595
whatsapp_group_join_requests
List pending requests to join a group.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID
Returns
Fallback text: "Group [email protected] has 2 pending requests"
When Join Requests Occur
Join requests happen when:
Group requires admin approval for new members
User clicks invite link but cannot auto-join
Hints
Read-only : true
Destructive : false
Idempotent : true
Implementation Reference
Source: src/ui/mcp/group.go:597-633
whatsapp_group_manage_join_requests
Approve or reject pending group join requests.
Parameters
Parameter Type Required Description group_idstring Yes Group JID or numeric ID participantsarray Yes Phone numbers of requesters (without suffix) actionstring Yes Action to apply: approve or reject
Returns
{
"success" : true ,
"action" : "approve" ,
"affected_count" : 2
}
Fallback text: "Approved 2 pending requests for [email protected] "
Example Usage
Approve Requests
Reject Requests
Hints
Read-only : false
Destructive : true
Idempotent : false
Implementation Reference
Source: src/ui/mcp/group.go:635-726
Helper Functions
Participant Change Parser
func parseParticipantChange ( action string ) ( whatsmeow . ParticipantChange , error ) {
switch strings . ToLower ( strings . TrimSpace ( action )) {
case "add" : return whatsmeow . ParticipantChangeAdd , nil
case "remove" : return whatsmeow . ParticipantChangeRemove , nil
case "promote" : return whatsmeow . ParticipantChangePromote , nil
case "demote" : return whatsmeow . ParticipantChangeDemote , nil
default : return "" , fmt . Errorf ( "invalid participant action: %s " , action )
}
}
Source: src/ui/mcp/group.go:728-741
Join Request Action Parser
func parseParticipantRequestChange ( action string ) ( whatsmeow . ParticipantRequestChange , error ) {
switch strings . ToLower ( strings . TrimSpace ( action )) {
case "approve" : return whatsmeow . ParticipantChangeApprove , nil
case "reject" : return whatsmeow . ParticipantChangeReject , nil
default : return "" , fmt . Errorf ( "invalid join request action: %s " , action )
}
}
Source: src/ui/mcp/group.go:743-752
String Array Parser
func toStringSlice ( raw any ) ([] string , error ) {
// Handles []string, []any with string items
// Trims whitespace from all items
}
Source: src/ui/mcp/group.go:754-779
Best Practices
Check permissions : Verify you’re an admin before attempting admin-only actions
Validate participants : Ensure phone numbers exist before adding to groups
Handle errors gracefully : Some operations may fail due to WhatsApp restrictions
Reset links carefully : Resetting invite links invalidates all existing links
Test with small groups : Validate changes on test groups before production use
Common Errors
Error Cause Solution not authorizedYou’re not an admin Only admins can perform this action participant not foundInvalid phone number Verify the participant exists group not foundInvalid group_id Check the group JID is correct cannot demote super adminAttempting to demote group creator Super admins cannot be demoted invalid actionUnknown action string Use add, remove, promote, or demote
Next Steps
Connection Tools Manage WhatsApp authentication and connection
Messaging Tools Send messages, images, and more