Skip to main content
Glama

WhatsMCP: MCP for WhatsApp

Pair Account

wa_pair_account

Begin linking a new WhatsApp account. Returns a QR code as a PNG image for the user to scan with their phone. The code expires every ~20 seconds — poll wa_pair_status with the returned pair_id to get the current code and to find out when the account is linked. Pass import_history to choose whether this pairing loads the phone's recent messages as history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
import_historyNoimport the phone's recent message history (about two months) as read-only history for this pairing; omit to use the workspace default

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYesstarting, qr, paired or failed
pair_idNopass this to wa_pair_status to follow the pairing
refusalNopresent only when pairing could not be started
needs_planNotrue when the linked number has no plan yet and will not run until the user buys one in the console
instructionsNowhat to tell the user to do
qr_png_base64Noa PNG image of the QR code, base64 encoded — display this to the user

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties
      Added value: +{
      +  "import_history": {
      +    "description": "import the phone's recent message history (about two months) as read-only history for this pairing; omit to use the workspace default",
      +    "type": [
      +      "null",
      +      "boolean"
      +    ]
      +  }
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / needs_plan
      Added value: +{
      +  "description": "true when the linked number has no plan yet and will not run until the user buys one in the console",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false, idempotentHint=false, destructiveHint=false, so the description carries the burden of explaining side effects. It discloses that the QR code expires every ~20 seconds, that the tool returns a pair_id, and that import_history controls whether phone history is loaded. It doesn't explicitly state that this is a state-changing operation, but the description's language ('Begin linking') and the QR-code flow make the non-read-only nature clear.

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

Conciseness5/5

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

The description is three sentences, each serving a distinct purpose: stating the action, explaining the QR code expiration and polling flow, and clarifying the optional parameter. It is front-loaded with the core purpose and avoids redundancy with the schema.

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?

The description covers the essential flow: initiating pairing, receiving a QR code, polling via wa_pair_status, and the import_history option. It doesn't mention what happens after successful pairing or any error cases, but given the output schema exists and the sibling wa_pair_status handles status, the description is sufficiently complete for an agent to invoke the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents import_history. The description adds value by explaining the behavioral consequence of import_history ('whether this pairing loads the phone's recent messages as history'), which goes beyond the schema's description. It doesn't detail the exact format of the boolean, but the schema covers that.

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?

The description clearly states the tool's function: 'Begin linking a new WhatsApp account' and specifies the output (QR code PNG). It distinguishes itself from the sibling wa_pair_status by explaining that this tool initiates the pairing while wa_pair_status polls for status/current code.

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?

The description explicitly tells the agent when to use this tool (to start linking) and directs it to wa_pair_status for polling the QR code and checking when the account is linked. It also explains the optional import_history parameter's purpose, giving clear context for usage.

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