Skip to main content
Glama

Connect WhatsApp

connect_whatsapp
Idempotent

Set 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

NameRequiredDescriptionDefault
phone_numberNothe user's own WhatsApp number in international format, for example 33612345678; needed only when the computer is not linked yet

Output Schema

NameRequiredDescriptionDefault
codeNopairing code to type on the phone
stateYesconnected, waiting_for_code or needs_phone_number
accountNo
expires_atNo
instructionsYeswhat to tell the user, in plain words

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations by disclosing the side effect of starting a background service, the idempotent behavior ("calling it again while a code is valid returns the same code"), and the already-linked branch where it only reports the account. It also tells the agent to relay the returned code and instructions verbatim, which is operationally important given openWorldHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and prerequisite before the code-relay mechanics, with no filler sentences. The note about WhatsApp also showing a notification on the phone is marginally useful for agent explanations but sits close to the edge of what earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the description needn't explain return values, and it still covers the full operational picture: service startup, phone-number prerequisite, code display instructions, repeat-call idempotency, and the already-linked case. Nothing an agent needs to call this correctly appears to be missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already documents the international format example and that the number is only needed when unlinked, so the description largely restates it. It adds the useful nuance that the number must be the user's own account, but that is a modest increment over structured data.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Set up WhatsApp on this computer") and then enumerates the concrete actions: starting the background service and obtaining an 8-character pairing code. It is clearly distinguishable from siblings like disconnect_whatsapp or whatsapp_status because it describes the linking flow itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit precondition ("Only call this when the user asked to connect or set up WhatsApp") and a prerequisite action (ask for the user's own phone number first, in international format). It does not name sibling tools such as whatsapp_status for checking whether the computer is already linked, so the routing guidance is strong but not complete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.