whatsapp_get_account_info
Retrieve your WhatsApp account details, including profile information and connection status, to verify active sessions and manage account access.
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 ToolHandler implementation for 'whatsapp_get_account_info'. Defines the tool name, description, empty input schema, and async handler function that logs the action, calls wsapiClient.get('/account/info'), and returns the account information.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:53-79 (registration)The setupToolHandlers method in WSAPIMCPServer that registers all tool handlers from various categories, including 'accountTools' which contains the 'whatsapp_get_account_info' handler, by iterating over tool objects and adding them to the tools Map keyed by name.private setupToolHandlers(): void { logger.info('Setting up tool handlers'); // Register all tool categories 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`); }
- src/server.ts:21-21 (registration)Import statement bringing in the accountTools object, which exports the whatsapp_get_account_info handler for registration.import { accountTools } from './tools/account.js';