whatsapp_get_account_info
Retrieve your WhatsApp account details including profile information and connection status to verify account setup and session activity.
Instructions
Get current account information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/account.ts:8-17 (handler)The complete ToolHandler object defining the 'whatsapp_get_account_info' tool, including name, description, empty input schema, and handler logic that fetches account info from '/account/info' endpoint.export const getAccountInfo: ToolHandler = { name: 'whatsapp_get_account_info', description: 'Get current account information.', inputSchema: { type: 'object', properties: {} }, handler: async () => { logger.info('Getting account info'); const result = await wsapiClient.get('/account/info'); return { success: true, account: result, message: 'Account information retrieved successfully' }; }, };
- src/server.ts:57-76 (registration)Tool registration logic in WSAPIMCPServer.setupToolHandlers(), where accountTools (containing the whatsapp_get_account_info handler) is added to toolCategories and registered into 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}`); }); });
- src/server.ts:21-21 (registration)Import of accountTools from src/tools/account.ts into the server, enabling its registration.import { accountTools } from './tools/account.js';
- src/tools/account.ts:85-85 (helper)Export of accountTools object grouping all account-related tools, including getAccountInfo, for server registration.export const accountTools = { getAccountInfo, setAccountName, setAccountPicture, setAccountPresence, setAccountStatus };