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 HITL config 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 a HITL config 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.4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, which is consistent with a token-creating (non-destructive mutation) operation, so no contradiction. The description adds real value beyond that: the Proof-account auth requirement, the fact that start_login does not open this tool, and the critical client behavior that tool results are folded away so the agent must re-emit the link in its own reply. It does not describe token lifetime/expiry or what happens if a token is never polled, which leaves a gap for a stateful workflow.

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 purpose and returns, with actionable agent guidance in a clearly labeled 'Agent usage' block. Minor waste: the boilerplate about 'the SMS text and number' is irrelevant to this tool and reads as copied from shared guidance, and the QR warning spans two sentences where one would do.

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?

Complete for a zero-param workflow starter: it covers purpose, return artifacts, downstream sibling calls, auth remediation, and the client rendering caveat, and an output schema documents the response shape so the description needn't restate it.

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; the baseline applies. The description does clarify semantics of the response fields (deep_link vs qr_code vs qr_text) and how the token threads into the polling sibling, which is a useful addition even if not strictly parameter semantics.

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+resource ('Create a Telegram chat ID discovery token') and immediately enumerates the returned artifacts (deep_link, qr_code, qr_text) and their purpose. It also distinguishes this tool from its close siblings by naming render_auth_link, poll_chat_id_discovery, and create_hitl as downstream steps.

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: pass deep_link to render_auth_link, never pass qr_text to a renderer, then poll poll_chat_id_discovery with the returned token until chat_id appears, then use it to create a HITL config. It also gives a when-to-use context (HITL config setup with a Telegram channel) and an auth prerequisite with the concrete remediation step.

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.