Skip to main content
Glama

Pair a number with WhatsApp

pair_number

Start (or resume) linking a WhatsApp account to one of your numbers. qr returns a QR code to scan from WhatsApp → Linked devices; code returns an 8-character linking code to type there instead, and needs the phone number being linked. Call it again every few seconds while someone scans: WhatsApp swaps the QR every 20 seconds, so show the one from the latest answer, and state turns "connected" when the scan lands. state: "pairing" with no code yet means it is still being made. Each linking session makes codes for expiresIn seconds; once that reaches 0, call again to start a new one. A restricted number needs recoveryConfirmed: true: set it only after checking that WhatsApp works on the phone. Temporary restrictions may clear after about an hour or take up to 24 hours; follow the notice on the phone, not a fixed timer. Free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "numberId": "<numberId>"
    },
    "name": "pair_number"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo`qr` (default) or `code` for the type-in linking code.
phoneNoRequired with `mode: "code"`: the phone number being linked.
numberIdYesId of the number to pair, from list_numbers.
recoveryConfirmedNoConfirm that WhatsApp works on the phone before reconnecting a restricted number. Required only while its status is banned. Never confirm automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Well beyond the annotations (readOnlyHint=false, destructiveHint=false), it discloses the rotating QR window, the polling cadence, the expiresIn session lifetime, the state transitions ('connected', 'pairing' with no code), and the range of restriction durations (about an hour up to 24 hours). It does not spell out failure/error modes for an invalid phone or an already-connected number, which keeps it short of a 5.

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?

Purpose is front-loaded in the first sentence, then mode behavior, then polling/session mechanics, then the restriction caveat. Dense but every clause carries information; the run-on punctuation with heavy backticking makes it slightly harder to scan than necessary.

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

Completeness4/5

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

There is no output schema, so the description carries the return-value burden and does it: state, qr, code, and expiresIn are all explained. What it omits is what happens on invalid input or a number already linked, which an agent would still need to discover empirically.

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 description coverage is 100%, so the schema already documents mode, phone, numberId, and recoveryConfirmed. The description largely restates these (code mode needs the phone number; recoveryConfirmed only after checking the phone) with only mild added caution beyond the schema's own 'Never confirm automatically.' Baseline 3 is appropriate.

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 ('Start (or resume) linking a WhatsApp account to one of your numbers') and immediately explains the two operating modes, so an agent can tell this apart from list_numbers, check_number, or cancel_pairing without opening a schema.

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

Usage Guidelines5/5

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

Gives explicit operational guidance: poll every few seconds while scanning, show the QR from the latest answer because WhatsApp rotates it every 20 seconds, call again once expiresIn hits 0, and set recoveryConfirmed only after verifying WhatsApp works on the phone. This covers when to call, how to repeat, and the one guarded parameter condition.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources