Skip to main content
Glama
billyfranklim1

mcp-evolution

Update Participants

update_participants

Manage WhatsApp group members by adding, removing, promoting, or demoting participants via the pinned instance.

Instructions

Add, remove, promote, or demote participants in a WhatsApp group via the pinned instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupJidYesGroup JID (e.g. 120363000000000000@g.us)
actionYesAction: add/remove members, promote to admin, demote from admin
participantsYesPhone numbers or JIDs of participants

Implementation Reference

  • The async handler function that executes the update_participants tool logic. It calls client.post() to send a request to the Evolution API endpoint with groupJid, action, and participants arguments.
        async (args) => {
          try {
            const data = await client.post(
              `/group/updateParticipant/${client.instanceName}?groupJid=${encodeURIComponent(args.groupJid)}`,
              { action: args.action, participants: args.participants }
            );
            return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
          } catch (e) {
            if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] };
            throw e;
          }
        }
      );
    }
  • Zod schema defining the input parameters: groupJid (string), action (enum: add/remove/promote/demote), and participants (array of strings).
    const schema = {
      groupJid: z.string().min(1).describe("Group JID (e.g. 120363000000000000@g.us)"),
      action: z.enum(["add", "remove", "promote", "demote"])
        .describe("Action: add/remove members, promote to admin, demote from admin"),
      participants: z.array(z.string().min(1)).min(1).describe("Phone numbers or JIDs of participants"),
    };
  • The registerUpdateParticipants function that registers the 'update_participants' tool on the MCP server with its metadata and handler.
    export function registerUpdateParticipants(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "update_participants",
        {
          title: "Update Participants",
          description: "Add, remove, promote, or demote participants in a WhatsApp group via the pinned instance.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const data = await client.post(
              `/group/updateParticipant/${client.instanceName}?groupJid=${encodeURIComponent(args.groupJid)}`,
              { action: args.action, participants: args.participants }
            );
            return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
          } catch (e) {
            if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] };
            throw e;
          }
        }
      );
  • The EvolutionClient.post() call that sends the API request to /group/updateParticipant/{instanceName} with the action and participants payload.
      `/group/updateParticipant/${client.instanceName}?groupJid=${encodeURIComponent(args.groupJid)}`,
      { action: args.action, participants: args.participants }
    );
  • Call site where registerUpdateParticipants(server, client) is invoked in the tools index to wire up the tool.
    registerUpdateParticipants(server, client);
Behavior2/5

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

Without annotations, the description must convey behavioral traits. It states mutating actions but omits side effects, authorization needs (likely admin), or implications of 'pinned instance'. No explanation of rate limits or idempotency.

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?

A single sentence covering the core functionality with no redundant words. Front-loaded with verb and resource, though the 'pinned instance' qualifier is slightly vague.

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

Completeness2/5

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

Given no output schema and no annotations, the description is too brief. Missing return format, error scenarios, and clarification of 'pinned instance'. Leaves ambiguity for a mutation tool with three required parameters.

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

Parameters3/5

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

Input schema provides 100% coverage with clear descriptions per parameter. The tool description adds no extra semantic value beyond listing actions, achieving the baseline for well-documented schemas.

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 description explicitly lists the four actions (add, remove, promote, demote) and the resource (WhatsApp group via pinned instance), clearly distinguishing it from sibling tools like create_group, get_group_info, or update_group_setting.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like create_group for new groups or fetch_group_resolved_participants for listing. Missing context about prerequisites (e.g., admin status) or scenario boundaries.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/billyfranklim1/mcp-evolution'

If you have feedback or need assistance with the MCP directory API, please join our Discord server