Skip to main content
Glama

Link WhatsApp via pairing code (no QR)

whatsapp_get_pairing_code

Request an 8-digit WhatsApp pairing code for a phone number to link a device via Linked Devices, with a fallback when pairing codes are unsupported.

Instructions

Requests an 8-digit pairing code from WhatsApp for the given phone number. Enter it on the phone under Linked Devices → Link with phone number instead. Falls back gracefully if the account does not support pairing codes.

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": {
      "phone": "<phone>"
    },
    "name": "whatsapp_get_pairing_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
phoneYesYour WhatsApp phone number with country code, digits only (e.g. 919876543210)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose real behavior: the 8-digit code format, the manual entry step required on the phone, and a graceful fallback when the account does not support pairing codes. It omits expiry time of the code, rate limits, and prerequisite auth/session state, which matter for retry logic.

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?

Three short sentences, front-loaded with the action and its output, then the user-side step, then the edge case. No redundant restatement of the tool name or 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?

For a one-parameter tool with no output schema and no annotations, the description covers what is produced, how to use it, and the unsupported-account case. Missing only operational details like code validity window and what it returns on fallback, which are minor for this complexity.

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 single `phone` parameter already documents country code and digits-only format with an example. The description only restates "for the given phone number," adding no format or validation detail beyond the schema. Baseline 3 applies.

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 ("Requests an 8-digit pairing code from WhatsApp") and scopes it to "the given phone number." The title's "no QR" framing separates it from the whatsapp_get_qr sibling, so an agent can pick between the two linkage paths 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 Guidelines4/5

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

Gives clear context: use it to obtain a pairing code and then enter it under Linked Devices → Link with phone number instead. It also signals a fallback exists when pairing codes are unsupported. It stops short of explicitly saying "prefer this over whatsapp_get_qr when the user cannot scan a QR," leaving the sibling choice to inference from the title.

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