whatsapp_get_instance_settings
Retrieve current WhatsApp instance configuration and operational parameters to manage account settings and session details.
Instructions
Get current instance settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/instance.ts:8-17 (handler)The main ToolHandler object implementing the whatsapp_get_instance_settings tool. Includes name, description, inputSchema, and the async handler function that logs the action, fetches instance settings from '/instance/settings' endpoint using wsapiClient, and returns success response with settings.export const getInstanceSettings: ToolHandler = { name: 'whatsapp_get_instance_settings', description: 'Get current instance settings.', inputSchema: { type: 'object', properties: {} }, handler: async () => { logger.info('Getting instance settings'); const result = await wsapiClient.get('/instance/settings'); return { success: true, settings: result, message: 'Instance settings retrieved successfully' }; }, };
- src/tools/instance.ts:11-11 (schema)Input schema for the tool, which is an empty object since the tool takes no parameters.inputSchema: { type: 'object', properties: {} },
- src/server.ts:53-79 (registration)The setupToolHandlers method in WSAPIMCPServer that registers all tools, including those from instanceTools (which contains whatsapp_get_instance_settings), by iterating over tool categories and adding each tool to the tools Map.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:20-20 (registration)Import statement bringing in the instanceTools object containing the whatsapp_get_instance_settings handler.import { instanceTools } from './tools/instance.js';
- src/tools/instance.ts:60-60 (registration)Export of the instanceTools object that groups the instance-related tools, including getInstanceSettings for registration in the server.export const instanceTools = { getInstanceSettings, updateInstanceSettings, restartInstance, updateApiKey };