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

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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';
  • Export of accountTools object grouping all account-related tools, including getAccountInfo, for server registration.
    export const accountTools = { getAccountInfo, setAccountName, setAccountPicture, setAccountPresence, setAccountStatus };

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