whatsapp_restart_instance
Restart the WhatsApp instance to resolve connectivity issues or refresh the session for the WSAPI WhatsApp MCP Server.
Instructions
Restart the WhatsApp instance.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/instance.ts:38-47 (handler)Implements the 'whatsapp_restart_instance' tool: no input required, restarts the WhatsApp instance via WSAPI PUT /instance/restart, returns success message.export const restartInstance: ToolHandler = { name: 'whatsapp_restart_instance', description: 'Restart the WhatsApp instance.', inputSchema: { type: 'object', properties: {} }, handler: async () => { logger.info('Restarting instance'); await wsapiClient.put('/instance/restart', {}); return { success: true, message: 'Instance restarted successfully' }; }, };
- src/tools/instance.ts:60-60 (registration)Groups the restartInstance handler with other instance tools for registration in the MCP server.export const instanceTools = { getInstanceSettings, updateInstanceSettings, restartInstance, updateApiKey };
- src/server.ts:57-76 (registration)Registers all tool categories, including instanceTools containing 'whatsapp_restart_instance', into the MCP 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}`); }); });