Skip to main content
Glama
Sealjay

mcp-whatsapp

by Sealjay

update_group_participants

Destructive

Add, remove, promote, or demote WhatsApp group participants after verifying admin rights; if you lack permission, the change fails and no one is altered.

Instructions

Add, remove, promote, or demote participants of a group after first checking that the paired user is a group admin (or, for add, that the group lets every member add) — if not, it fails and nothing changes. The group shows a system message for each change; people whose privacy settings block being added directly get a WhatsApp group-invite card in their 1:1 chat instead (unless send_invite=false) and join by tapping it; invites share the outbound rate limit (about one per 45–90 s), so in a batch the rest come back as invite_required with a retry hint — repeat the add for them later. Reversible by calling again with the inverse action (add ↔ remove, promote ↔ demote), though a sent invite cannot be recalled. Returns {chat_jid, group_name, action, is_admin, results: [{input, jid, status, error_code?, error?, invite_message_id?, invite_expires_at?}]} where status is one of added, removed, promoted, demoted, already_member, not_member, invite_sent, invite_required, invite_failed, failed.

Input Schema

NameRequiredDescriptionDefault
actionYesmutation to perform: `add`, `remove`, `promote` (to admin), or `demote` (from admin)
chat_jidYesgroup JID as `<digits>-<timestamp>@g.us` or `<digits>@g.us` (use list_groups to find it)
send_inviteNoonly for `add`: when someone's privacy settings block adding them directly, send them a group-invite card in their 1:1 chat (defaults to true); false just reports `invite_required`
participantsYespeople to change, as phone digits only (E.164 without `+`, no spaces) or individual JIDs (`<digits>@s.whatsapp.net` or `<digits>@lid`); each at most once
invite_messageNooptional caption shown on the invite card (defaults to none); ignored unless an invite is sent

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.6.0
    • changedInput schema / properties / chat_jid / description
      Previous value: -"WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`"New value: +"group JID as `<digits>-<timestamp>@g.us` or `<digits>@g.us` (use list_groups to find it)"
    • addedInput schema / properties / invite_message
      Added value: +{
      +  "description": "optional caption shown on the invite card (defaults to none); ignored unless an invite is sent",
      +  "type": "string"
      +}
    • changedInput schema / properties / participants / description
      Previous value: -"participants to mutate, as bare phone digits or individual JIDs (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`)"New value: +"people to change, as phone digits only (E.164 without `+`, no spaces) or individual JIDs (`<digits>@s.whatsapp.net` or `<digits>@lid`); each at most once"
    • addedInput schema / properties / send_invite
      Added value: +{
      +  "default": true,
      +  "description": "only for `add`: when someone's privacy settings block adding them directly, send them a group-invite card in their 1:1 chat (defaults to true); false just reports `invite_required`",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv0.3.0
    • changedInput schema / properties / action / description
      Previous value: -"participant mutation to perform"New value: +"mutation to perform: `add`, `remove`, `promote` (to admin), or `demote` (from admin)"
    • changedInput schema / properties / participants / description
      Previous value: -"phone numbers or individual JIDs (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`)"New value: +"participants to mutate, as bare phone digits or individual JIDs (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`)"
  3. Added
  4. Removed
  5. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare a destructive, non-idempotent, open-world mutation, but the description goes far beyond that: atomic failure semantics, system messages per change, privacy-blocked users receiving a 1:1 invite card, invite outbound rate limits (~one per 45-90 s) with `invite_required` batch behavior, and explicit reversibility mapping — plus the irreversibility of an already-sent invite. This is exactly the extra context annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The paragraph is dense and front-loads the action list, precondition, and failure mode before the secondary invite mechanics, so the most important facts come first. It is long, but nearly every clause carries load-bearing behavior; the inline return-shape dump is justified because no output schema exists, though a light structure would improve scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, destructive, multi-mode mutation with no output schema, the description supplies the admin precondition, partial-failure semantics, invite flow, rate limits, reversibility, and the full result envelope with every status value. Nothing an agent needs to call this correctly or interpret the response is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline would be 3, but the description adds real meaning: `send_invite=false` is tied to the `invite_required` status and the rate-limit batching outcome, and `invite_message` is tied to the invite card rather than the group mutation. That connects parameters to observable results, which the schema alone does not.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a precise verb set (add/remove/promote/demote) against a specific resource (group participants), which an agent can immediately distinguish from siblings like create_group, leave_group, or set_group_name. It also states the governing precondition (requester must be admin, or the group permits member-adds) up front.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly states the conditions under which the call succeeds or fails ('if not, it fails and nothing changes') and describes the invite fallback path with the `send_invite=false` opt-out. What it does not do is name a sibling alternative (e.g., leave_group for self-removal), so routing is implied by the action enum rather than stated outright.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.