Skip to main content
Glama
wsapi-chat
by wsapi-chat

whatsapp_update_group_name

Change the name of a WhatsApp group by providing the group ID and new name, enabling group management through the WSAPI WhatsApp MCP Server.

Instructions

Update group name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYesGroup ID (with @g.us)
nameYesNew group name

Implementation Reference

  • The complete ToolHandler definition for 'whatsapp_update_group_name', including inputSchema for MCP and the handler function that performs input validation and API call to update the group name.
    export const updateGroupName: ToolHandler = { name: 'whatsapp_update_group_name', description: 'Update group name.', inputSchema: { type: 'object', properties: { groupId: { type: 'string', description: 'Group ID (with @g.us)' }, name: { type: 'string', description: 'New group name' }, }, required: ['groupId', 'name'], }, handler: async (args: any) => { const input = validateInput(updateGroupNameSchema, args); await wsapiClient.put(`/groups/${input.groupId}/name`, { name: input.name }); return { success: true, message: 'Group name updated successfully' }; }, };
  • Zod schema used for internal validation of inputs in the whatsapp_update_group_name handler.
    export const updateGroupNameSchema = z.object({ groupId: groupIdSchema, name: z.string().min(1).max(255), });
  • src/server.ts:57-65 (registration)
    Registration of groupTools (which includes whatsapp_update_group_name) in the toolCategories array, which is then looped over to register all tools in the MCP server.
    const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ];
  • src/server.ts:17-17 (registration)
    Import of groupTools containing the whatsapp_update_group_name tool.
    import { groupTools } from './tools/groups.js';

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/wsapi-chat/wsapi-mcp'

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