Skip to main content
Glama

Connect WhatsApp by code

dosai_get_whatsapp_pairing_code
Destructive

Connect the business's WhatsApp number without a QR: returns an 8-character code. Tell the owner, on the phone with that WhatsApp: Settings → Linked devices → Link a device → Link with phone number instead, and type the code (it lives about a minute; if it expired, call again). If the answer says the code is being prepared, call again in 10 seconds. Then check dosai_get_whatsapp_status. Admin or owner.

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

Input Schema

NameRequiredDescriptionDefault
phoneYesThe WhatsApp number with country code, e.g. 77071234567.
project_idYesFrom dosai_list_projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / project_id / description
      Previous value: -"Project id, as returned by dosai_list_projects."New value: +"From dosai_list_projects."
  2. Changed1 schema field changed
    • removedInput schema / properties / project_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations flag this as a non-readonly, destructive action, and the description adds genuinely useful behavior beyond them: an auth requirement (Admin or owner), a short-lived credential (~1 minute), an explicit retry cadence, and the next tool to call. It does not explain what the destructiveHint implies — e.g. whether requesting a pairing code invalidates an existing linked session — which is the one gap an agent most needs filled for a destructive operation.

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 and return value are front-loaded, followed by actionable steps with the expiry and retry caveats inline; nothing is padded or redundant. It is dense and slightly run-on, packing instructions, timing, and permissions into two long sentences, but every clause carries operational weight.

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?

With no output schema, the description correctly compensates by describing the return value (an 8-character code) and the 'code is being prepared' intermediate state, plus the permission requirement and follow-up tool. The only missing piece is post-call state effects — whether an existing WhatsApp connection is affected — which matters given destructiveHint=true.

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%, with both parameters documented and an example phone value already in the schema. The description adds only the contextual meaning that the phone is the WhatsApp number the owner is physically holding, not a separate contact number. 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 ('Connect the business's WhatsApp number without a QR') and immediately discloses the output ('returns an 8-character code'). The 'without a QR' clause implicitly separates it from the QR-based connect-link sibling, so an agent can pick between them 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 operational sequencing: relay the code to the owner, re-call after ~10 seconds if the response says the code is being prepared, and follow up with dosai_get_whatsapp_status. It also states the admin/owner permission gate. It never explicitly names dosai_get_whatsapp_connect_link as the QR alternative or states when not to use this path, which keeps it out of 5 territory.

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