Skip to main content
Glama

wait_for_chat_id_discovery

Read-only

Poll a chat ID discovery token until the user interacts with the Telegram bot. Uses exponential backoff (2s initial, 1.5x, 30s max) with jitter.

Agent usage: Call this after create_chat_id_discovery. Present the discovery response's deep_link with render_auth_link first, then poll with the returned token. Terminal states: "completed" (chat_id discovered — use it when creating a HITL config with a Telegram channel), "expired". While "pending", the user has not yet opened the Telegram link.

The user does not see tool results — most clients fold them away, render_auth_link's output included. Before you wait or poll, put what the user must act on into your own reply text: the link itself (not a sentence announcing it), the SMS text and number, or a note to check their inbox.

ACCESS: needs a Proof account. Authenticate this client (Claude Code: /mcp → Authenticate), then call this tool again. start_login does NOT open this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesDiscovery token from create_chat_id_discovery
timeout_secondsNoMaximum wait time in seconds (default: 50, max: 600). Keep it under your MCP client's request timeout (the SDK default is 60 s) — a longer wait is cut off by the client while the server is still polling. On timeout the tool answers status "pending"; call it again with the same identifier.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

With only readOnlyHint=true in annotations, the description carries real behavioral weight: exponential backoff parameters (2s, 1.5x, 30s max, jitter), the pending/completed/expired state machine, timeout semantics, and the non-obvious caveat that users cannot see tool results so the agent must surface the link itself. This is exactly the context annotations cannot convey.

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 and polling mechanics, then usage sequence, then the client-rendering caveat. It is somewhat long, and the SMS/number/inbox examples drift beyond this tool's Telegram scope, but every paragraph is purposeful and the ordering is sound.

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, yet the description documents terminal states, the pending case, retry-on-timeout behavior, and the auth prerequisite (Proof account, /mcp authentication, and that start_login does not open this tool). Nothing an agent needs to invoke 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 description coverage is 100% and the schema already explains both token and timeout_seconds thoroughly, including the 60s client-timeout warning. The description only restates 'poll with the returned token', adding no meaning beyond the schema, so the baseline 3 applies.

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 ('Poll a chat ID discovery token until the user interacts with the Telegram bot'), which is far better than a tautology. However, it never distinguishes itself from the sibling poll_chat_id_discovery, which appears to do something very similar, so an agent cannot tell them apart from the text alone.

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 a clear call sequence: use after create_chat_id_discovery, present deep_link via render_auth_link first, then poll with the returned token. It also enumerates terminal states ('completed', 'expired') and what 'pending' means. It stops short of saying when to prefer this over poll_chat_id_discovery, which is the one ambiguity 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.