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

whatsapp_set_account_name

Change your WhatsApp account display name through the WSAPI WhatsApp MCP Server by specifying a new name up to 255 characters.

Instructions

Update account display name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNew account name (max 255 characters)

Implementation Reference

  • The ToolHandler object defining the whatsapp_set_account_name tool, including name, description, inputSchema, and the async handler function that validates input using setAccountNameSchema and updates the account name via wsapiClient.put('/account/name').
    export const setAccountName: ToolHandler = { name: 'whatsapp_set_account_name', description: 'Update account display name.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'New account name (max 255 characters)' } }, required: ['name'], }, handler: async (args: any) => { const input = validateInput(setAccountNameSchema, args); logger.info('Setting account name'); await wsapiClient.put('/account/name', input); return { success: true, message: 'Account name updated successfully' }; }, };
  • Zod schema used for input validation in the tool handler, specifying the 'name' field with length constraints.
    export const setAccountNameSchema = z.object({ name: z.string().min(1).max(255), });
  • src/server.ts:57-65 (registration)
    Registration of accountTools (which includes whatsapp_set_account_name) into the toolCategories array, which is then iterated to register each tool into the server's tools Map.
    const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ];
  • src/server.ts:21-21 (registration)
    Import of the accountTools object containing the whatsapp_set_account_name handler.
    import { accountTools } from './tools/account.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