Skip to main content
Glama

channels_connect_session_get

Read-onlyIdempotent

Where a connect session stands. Poll every 2-3 seconds.

Returns {status, qr, qr_expires_at, expires_at, pairing_code, account_id, phone, name, external_ref, error}. qr is always the current code: draw whatever the latest answer carries and keep nothing. A value that starts with data: is a picture to show as it is (Viber); anything else is a string to draw. qr_expires_at is null when the channel does not say (WhatsApp, Viber).

After the number is connected the session keeps answering connected with account_id, phone and name for 15 minutes. A session of another workspace or key is not found.

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": {
      "session_id": "<session_id>"
    },
    "name": "channels_connect_session_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYesThe session_id that channels.connect_session.start returned.
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. Added

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/openWorld annotations, the description adds substantial behavior: the qr value must always be redrawn from the latest response (nothing is persisted), 'data:' prefixed values are images, qr_expires_at is null for WhatsApp/Viber, a connected session keeps answering for 15 minutes, and cross-workspace/key sessions return not-found. Only rate-limit specifics and the exact not-found error shape are left unstated.

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 purpose and polling cadence, then the return contract, then a scannable status list. Dense and mostly earning its place, with minor repetition ('always draw the one from the latest get' restated inside waiting_scan).

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?

There is no output schema, so the description must carry the return contract — and it enumerates every field in the response and the semantics of the tricky ones (qr, qr_expires_at, error). Combined with the status playbook, an agent can drive a full connect flow from this text alone.

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 (session_id, in_workspace) are documented inline, so baseline is 3. The description adds only an indirect hint about workspace scoping ('a session of another workspace or key is not found') and does not otherwise explain in_workspace's isolated, non-persisted behavior beyond what the schema says.

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?

The opening line 'Where a connect session stands' plus the polling instruction makes the operation unambiguous: this is a status-read for a connect session. It is implicitly differentiated from siblings by the per-status guidance that routes the agent to submit/cancel/start actions, though no sibling is named explicitly.

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?

Explicit polling cadence ('every 2-3 seconds') and a status-by-status playbook: waiting_scan → draw qr and keep polling, need_phone → submit phone, need_code → submit code, need_password → submit 2FA password, need_pairing_code → show pairing code, expired → start a new session. That is effectively when-to-use, when-to-stop, and what-to-do-instead for every possible outcome.

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.