Skip to main content
Glama

Connect instance (QR or pairing code)

connect_instance
Idempotent

Starts a WhatsApp instance connection by generating a QR code or, when given a phone number, a pairing code for the user to enter in Linked devices.

Instructions

Starts the WhatsApp connection of an instance. Without phone it generates a QR code; with phone (international format, digits only) it generates a pairing code the user types in WhatsApp > Linked devices > Link with phone number. Use when get_instance_status shows disconnected. The user must complete the step on their phone.

Input Schema

NameRequiredDescriptionDefault
phoneNoPhone of the WhatsApp account to link, digits with country code. Omit to get a QR code instead.
instance_idNoZapZap instance id (a connected WhatsApp number). Optional when ZAPZAP_INSTANCE_ID is configured; otherwise call list_instances first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare non-read-only, idempotent, non-destructive and open-world, so safety is covered; the description adds the crucial behavioral fact that 'The user must complete the step on their phone', which no annotation conveys. It still doesn't say whether the call blocks until connected, returns immediately, or must be polled via get_instance_status.

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?

Three dense sentences with the core behavior front-loaded before the mode detail and the user-action caveat. The WhatsApp menu breadcrumb is slightly verbose but earns its place by making the pairing-code flow unambiguous.

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

Completeness3/5

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

There is no output schema, yet the description never says what comes back — a QR payload, a pairing code string, or just a status — nor whether the agent should poll get_instance_status afterward. For a two-mode connection tool that gap matters, though the workflow trigger and user-side instruction are well covered.

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 both parameters are already documented there, including 'Omit to get a QR code instead' and the instance_id fallback. The description's 'international format, digits only' largely restates the schema's 'digits with country code', so it adds little beyond the baseline.

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

Purpose4/5

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

States a specific verb and resource ('Starts the WhatsApp connection of an instance') and clearly splits the two modes: QR without `phone`, pairing code with `phone`. It doesn't differentiate itself from the sibling get_qr_code, which appears to overlap with the no-`phone` path, so an agent still has to guess which of the two to use for QR retrieval.

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 triggering condition: 'Use when get_instance_status shows disconnected', naming the sibling to check first. It also warns the flow is not fully programmatic. There is no explicit when-not guidance (e.g. what to do if already connected, or when to prefer get_qr_code).

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