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

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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' }; }, };
  • 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}`); }); });

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