Skip to main content
Glama

channels_connect_session_start

🔌 Start connecting a WhatsApp, Telegram or Viber number from your own screen, with no DialogBrain login for the person who owns the number.

Returns {session_id, status, qr, qr_expires_at, expires_at}. qr is the RAW string to draw as a QR code, not a picture. Viber is the exception: its qr is a data:image/png;base64,... URL, the picture of the code Viber itself draws; show it as an image. It is null for the first seconds, while Viber starts. Then poll channels.connect_session.get every 2-3 seconds.

Methods (channels.connect_session.options lists what is supported right now): whatsapp qr or pairing_code; telegram qr or phone; viber qr (scanned in Viber on the phone: More > Settings > Account > Desktop and Tablets). For pairing_code and phone the session starts at need_phone and the number is sent with channels.connect_session.submit.

The account will belong to the user behind the API key. external_ref is your own label (an employee id, a row id): it comes back in get, on the account in channels.list and in the channel.connected webhook.

A workspace with no way to pay for the channel is refused here with error_type billing_required, before any code is shown. Other refusals: permission_denied, unsupported_channel, rate_limited (10 starts per 10 minutes).

Statuses: waiting_scan: show qr (it changes; always draw the one from the latest get; null means the code is not ready yet, keep polling). need_phone: submit the phone number. need_code: submit the code Telegram sent. need_password: submit the Telegram two-step verification password. need_pairing_code: show pairing_code; the person types it in WhatsApp > Linked devices > Link with phone number. connected: account_id, phone, name are set. expired: start a new session. error: error says why.

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": {
      "channel": "<channel>"
    },
    "name": "channels_connect_session_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodNo'qr' (default), 'pairing_code' (whatsapp) or 'phone' (telegram).
channelYes'whatsapp', 'telegram' or 'viber'.
external_refNoYour own label for this connection. Stored with the session and the account.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / channel / description
      Previous value: -"'whatsapp' or 'telegram'."New value: +"'whatsapp', 'telegram' or 'viber'."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations by disclosing refusals (billing_required before any code is shown, permission_denied, unsupported_channel, rate_limited at 10 starts per 10 minutes), the account ownership rule (account belongs to the API key holder), and the full set of session statuses with what each demands. It also clarifies a non-obvious rendering trap: `qr` is a RAW string except for Viber's data-URL image and can be null initially.

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?

Front-loaded with the core action, then returns, then polling, then methods, then statuses — a sensible ordering. It is dense and long, and the Viber sub-instructions and nested status list add bulk, but nearly every sentence carries operational value for a multi-step state machine.

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 fully documents the return object (session_id, status, qr, qr_expires_at, expires_at) and enumerates every status value and the required agent action for each. For a stateful, multi-step connection flow with billing and rate-limit failure modes, nothing an agent needs is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: `external_ref` returns in get, on the account in channels.list, and in the channel.connected webhook — a lifecycle consequence the schema does not state. `method` and `channel` values are also related to concrete flows in the prose.

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 ('Start connecting a WhatsApp, Telegram or Viber number') and adds the distinguishing scope 'from your own screen, with no DialogBrain login' — a fundamentally different flow from a plain channels_connect. An agent can identify both the action and the actor from the first sentence.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly routes the agent: 'poll channels.connect_session.get every 2-3 seconds', 'channels.connect_session.options lists what is supported right now', and 'the number is sent with channels.connect_session.submit'. It also names when-not-to-continue — 'expired: start a new session'. Method selection guidance (which channel supports qr/pairing_code/phone) is spelled out.

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.