Connect WhatsApp
connect_whatsappSet up WhatsApp on this computer: start the background service and, if not linked, generate an 8-character pairing code for your phone number to link the account.
Instructions
Set up WhatsApp on this computer: start the background service if needed and, when the computer is not linked yet, get an 8-character pairing code for the user's phone number. Only call this when the user asked to connect or set up WhatsApp, and ask them for the phone number of their own WhatsApp account first (international format, for example 33612345678). Show the code and the instructions to the user exactly as returned: they type the code on their phone, which is what links the account. WhatsApp also shows a notification on the phone. Calling it again while a code is valid returns the same code; when the computer is already linked it only reports the account.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "connect_whatsapp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone_number | No | the user's own WhatsApp number in international format, for example 33612345678; needed only when the computer is not linked yet |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | pairing code to type on the phone | |
| state | Yes | connected, waiting_for_code or needs_phone_number | |
| account | No | ||
| expires_at | No | ||
| instructions | Yes | what to tell the user, in plain words |