Skip to main content
Glama
by wsapi-chat

whatsapp_set_account_name

Update your WhatsApp account display name to personalize your profile and maintain current identification across all chats and contacts.

Instructions

Update account display name.

Input Schema

NameRequiredDescriptionDefault
nameYesNew account name (max 255 characters)

Input Schema (JSON Schema)

{ "properties": { "name": { "description": "New account name (max 255 characters)", "type": "string" } }, "required": [ "name" ], "type": "object" }

Implementation Reference

  • The complete ToolHandler definition for 'whatsapp_set_account_name', including description, inline input schema, and the handler function that validates input using Zod schema and updates the account name via WSAPI.
    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 for validating the input to the whatsapp_set_account_name tool, enforcing name as string between 1-255 characters.
    export const setAccountNameSchema = z.object({ name: z.string().min(1).max(255), });
  • Export of accountTools object that bundles the setAccountName handler (among others) for registration in the MCP server.
    export const accountTools = { getAccountInfo, setAccountName, setAccountPicture, setAccountPresence, setAccountStatus };
  • src/server.ts:57-79 (registration)
    Registration logic in MCP server that includes accountTools in toolCategories and registers each tool by name in the server's tools Map.
    const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ]; toolCategories.forEach(category => { Object.values(category).forEach(tool => { if (this.tools.has(tool.name)) { logger.warn(`Tool ${tool.name} already registered, skipping`); return; } this.tools.set(tool.name, tool); logger.debug(`Registered tool: ${tool.name}`); }); }); logger.info(`Registered ${this.tools.size} 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/wsapi-chat/wsapi-mcp'

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