Skip to main content
Glama

create_chat_id_discovery

Create a Telegram chat ID discovery token. Returns a deep_link, qr_code (base64 PNG), and qr_text (UTF-8 text QR for terminal display). The user opens the link in Telegram, which reveals their chat ID for approval channel setup.

Agent usage: pass the response's deep_link to render_auth_link so the user can click or scan it. Never hand qr_text to a link renderer — it is that same link already rendered as QR art. Print it verbatim inside a fenced code block only when a real terminal needs the QR. Then poll poll_chat_id_discovery with the returned token until the chat_id appears. Use the discovered chat_id when creating an approval channel with a Telegram channel.

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_chat_id_discovery"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
tokenYes
qr_codeYesQR code data URL for the deep link
qr_textYesUTF-8 text representation of the QR code for terminal/agent display
deep_linkYes
expires_inYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "description": "Chat ID discovery token and Telegram deeplink",
      +  "properties": {
      +    "deep_link": {
      +      "type": "string"
      +    },
      +    "expires_in": {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "qr_code": {
      +      "description": "QR code data URL for the deep link",
      +      "type": "string"
      +    },
      +    "qr_text": {
      +      "description": "UTF-8 text representation of the QR code for terminal/agent display",
      +      "type": "string"
      +    },
      +    "token": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "token",
      +    "deep_link",
      +    "qr_code",
      +    "qr_text",
      +    "expires_in"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false, so the description must carry the rest — and it does: it discloses the token-based flow, that the user must open the link in Telegram, that the token is consumed by a later poll, and the Proof-account authentication prerequisite including the caveat that start_login does not unlock this tool. The generic closing note that clients fold away tool results is useful but is advisory boilerplate rather than behavior of this specific tool.

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?

Well front-loaded: purpose and return artifacts first, then operational steps, then access requirements. The final paragraph about users not seeing tool results is broadly applicable boilerplate that lengthens the definition beyond this tool's needs, though it is genuinely actionable here.

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?

Despite an output schema existing, the description adds the semantic meaning of the returned fields (which to render, which not to) plus the full multi-step workflow and auth precondition. An agent has everything needed to call it, handle the response, and continue into polling without guessing.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies. The description does clarify that a token is produced and returned rather than supplied, which prevents an agent from looking for an input field.

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 ('Create a Telegram chat ID discovery token') and immediately names the three artifacts returned (deep_link, qr_code, qr_text). This clearly separates it from the polling siblings (poll_chat_id_discovery, wait_for_chat_id_discovery), which the description also references by name.

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?

Gives explicit routing: pass deep_link to render_auth_link, never hand qr_text to a link renderer, print qr_text verbatim in a fenced block only when a real terminal needs the QR, then poll poll_chat_id_discovery with the returned token, and finally feed the chat_id into approval-channel creation. Both the preferred path and the misuse case are 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.