force_resync
Force a full WhatsApp resync by clearing app state and reconnecting, fixing synchronization issues and refreshing chat data.
Instructions
Force a full WhatsApp resync (clears app state and reconnects).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/auth.ts:68-94 (handler)Tool handler function for 'force_resync' - the MCP tool entry point that calls whatsappService.forceResync() and returns a success/error text result.
async function forceResync( whatsappService: WhatsAppService, ): Promise<CallToolResult> { try { await whatsappService.forceResync(); return { content: [ { type: "text", text: "Resync started. WhatsApp will reconnect and replay history.", }, ], isError: false, }; } catch (error) { log.error("Error forcing resync:", error); return { content: [ { type: "text", text: `Error forcing resync: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } } - src/tools/auth.ts:56-63 (registration)MCP tool registration for 'force_resync' via server.tool(), registering it with empty schema and linking to the forceResync handler function.
server.tool( "force_resync", "Force a full WhatsApp resync (clears app state and reconnects).", {}, async (): Promise<CallToolResult> => { return await forceResync(whatsappService); }, );