Skip to main content
Glama

Open a WhatsApp dialog by phone number

dosai_open_conversation

Open (or find) the dialog for a phone number in WhatsApp, so send_operator_message can write to someone who has no dialog in the cabinet yet. Sends NOTHING by itself: it only creates the dialog row and returns its id. In a dialog opened this way the bot is OFF (reason: the chat was started by an operator), exactly as when the owner writes first from the phone; use toggle-ai in the cabinet to let the bot take over. If the dialog already exists it is returned untouched (created=false). The person's earlier WhatsApp history is pulled from the owner's phone on the first message in the chat, so a freshly opened dialog is empty until then. Requires editor role and the project's WhatsApp connected.

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_open_conversation"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoName for the dialog card, if you know it.
phoneYesPhone number in WhatsApp, 10-15 digits, any formatting (+7 705 ... is fine).
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.4/5.0
Behavior5/5

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

Annotations only declare it is a non-destructive, non-open-world write; the description goes far beyond that with 'Sends NOTHING by itself: it only creates the dialog row and returns its id'. It further discloses the bot-OFF state and its reason, idempotent behavior on existing dialogs, the delayed history pull, and the editor-role plus WhatsApp-connected prerequisites — exactly the context annotations cannot carry.

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?

Dense but front-loaded: the action, the no-side-effect guarantee, and the bot-state caveat come in the first three sentences. Some clauses are compressed to the point of being run-on, but no sentence is 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?

For a non-destructive mutation with no output schema, the description supplies the return shape (dialog id, created=false) and the prerequisite chain (editor role, WhatsApp connected). An agent has everything needed to call it correctly and to interpret the result without further discovery.

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%, so phone formatting, name purpose and project_id provenance are already documented in the schema. The description adds no parameter-level detail beyond what those field descriptions provide, which is the baseline case rather than a gap worth penalizing.

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 — 'Open (or find) the dialog for a phone number in WhatsApp' — and immediately ties it to its downstream consumer, send_operator_message, for a person with no dialog yet. The idempotent twist ('or find', 'created=false') is explicit, so the agent can tell this apart from a pure lookup tool.

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?

The trigger condition is clear: use it when a target has no dialog and you need one for send_operator_message. It also routes onward for a related need ('use toggle-ai in the cabinet to let the bot take over'). It stops short of naming a lookup alternative (e.g. get_conversation) for the case where the dialog already exists, so there is modest inference left.

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