Skip to main content
Glama

Get QR code to connect WhatsApp

get_qr_code
Read-onlyIdempotent

Retrieve a WhatsApp instance’s QR code as a base64/data payload so users can scan it in Linked Devices when disconnected; call again if the code expires.

Instructions

Returns the QR code (base64/data payload) for an instance so the user can scan it in WhatsApp > Linked devices. Use when the instance is disconnected. QR codes expire in about a minute; call again if it expired. If the instance is already connected the response says so. Read-only. Show the QR to the user; do not try to decode it.

Input Schema

NameRequiredDescriptionDefault
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

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), but the description adds real value beyond them: ~1 minute QR expiry, the need to re-call after expiry, and the alternative response when already connected. It also gives an output-handling instruction ('show the QR, do not decode it') that no structured field conveys.

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?

Front-loads what is returned and why, then layers the usage condition, expiry caveat, edge case, and display instruction. Every sentence carries distinct, actionable information with no filler.

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?

With no output schema, the description still tells the agent what comes back (base64/data payload, or a connected-state notice) and how to handle it. For a single optional-parameter read tool, nothing needed to call it correctly is 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 instance_id field already documents the ZAPZAP_INSTANCE_ID fallback and the list_instances prerequisite. The description adds nothing about the parameter, so the schema does all the work — baseline 3.

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 ('Returns the QR code ... for an instance') plus the concrete user-facing outcome (scan in WhatsApp > Linked devices). It doesn't name a sibling tool explicitly, so differentiation from connect_instance/get_instance_status is implied rather than stated.

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?

'Use when the instance is disconnected' and 'call again if it expired' give clear when-to-use and retry conditions, and the already-connected case is pre-empted. No explicit exclusion pointing at a sibling alternative such as connect_instance, which keeps it below a 5.

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