Skip to main content
Glama

Find a Telegram chat

telegram_find_chat
Read-onlyIdempotent

Find a person, group or channel by a partial name/title, @username, public Telegram link or numeric chat ID. Use chat_type to filter channels, groups or private chats. With Session, exact @usernames/public links resolve directly through Telegram; partial names search up to 1000 recent account dialogs, case-insensitively. Without Session, search is limited to this account's archive. A post link resolves its chat, not the specific post. This does not join channels or perform global fuzzy search. Clarify ambiguous matches; use a known chat_id directly. If the requested channel cannot be read with the current connection, explain /session in @lemma_telepath_bot; do not require channel ownership or bot admin rights just for Session reading. Management of an owned channel uses /channels separately. On no matches, explain only the observed search scope in the user's language; do not invent a cause or say the chat does not exist. For a Session name-search miss, explain the 1000-dialog bound and try a known exact @username/public link; otherwise ask for one or a more precise name. For an exact-username miss, ask the user to check the username; do not treat it as a confirmed access denial. For a confirmed archive-only miss, say the chat is absent from the saved archive; not yet connected or no saved messages are possibilities, not established facts. Offer the relevant setup path, not every option: private conversations use Telegram Chat Automation, selecting @lemma_telepath_bot and the desired chats, then saving; send /setup to https://t.me/lemma_telepath_bot for device-specific steps. For an owned channel, send /channels to that bot, choose Connect my channel and add it as administrator. For a group, an administrator can add @lemma_telepath_bot as a group administrator; the connected user must be a member. Do not request delete, ban or invite permissions just for reading. Bot API saves new messages received after setup; older history needs /import or accessible Session reads. If the user prefers not to add a bot, cannot add it, or wants to read someone else's accessible channel, offer Session: open https://t.me/lemma_telepath_bot, send /session, tap Connect Telegram and sign in by QR or phone on the connection page. Session also reads the user's own chats; private channels still require account access. Never ask for login codes/passwords in the assistant chat. Do not prescribe reconnection solely for an empty result or require setup for already usable archive content. If the tool errors, distinguish that from zero matches: explain the reported reason and an appropriate next step. Respect a returned retry delay; do not describe a timeout or temporary service failure as lost permissions. If the cause is unknown, say so and suggest retrying or support at https://t.me/hellolemma.

Input Schema

NameRequiredDescriptionDefault
limitNoHow many candidates to return. Default 20; Session returns at most 50, archive search at most 100.
queryYesPartial name/title, exact @username, public t.me link, or numeric chat id.
chat_typeNoFilter by chat type. group includes basic groups and supergroups; channel means broadcast channels.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"How many candidates to return. Default 20."New value: +"How many candidates to return. Default 20; Session returns at most 50, archive search at most 100."
  2. Changed2 schema fields changed
    • addedInput schema / properties / chat_type
      Added value: +{
      +  "description": "Filter by chat type. group includes basic groups and supergroups; channel means broadcast channels.",
      +  "enum": [
      +    "private",
      +    "group",
      +    "supergroup",
      +    "channel",
      +    "channel_dm"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Name, @username, or numeric chat id."New value: +"Partial name/title, exact @username, public t.me link, or numeric chat id."
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description discloses search scope (Session up to 1000 recent dialogs vs. archive-only), case-insensitive matching, that post links resolve to the chat rather than the post, and extensive error/miss handling expectations. It clearly separates errors from zero matches and warns against inferring access denial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded with a strong two-sentence purpose and usage core, but it then expands into a very long support and setup manual. Much of the later content concerns user-facing remediation rather than helping an agent select or invoke the tool, so many sentences do not earn their place in this definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the open-world search behavior, the description is thorough about scope limits, Session versus archive behavior, no-match interpretation, and error handling. However, with no output schema, it does not describe the shape of returned candidates, leaving a gap for an agent that needs to interpret results.

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%, so the schema already documents query, limit, and chat_type. The description adds some nuance about chat_type filtering and search behavior, but it does not meaningfully expand parameter semantics beyond what the schema already provides.

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?

The first sentence states a specific verb and resource: find a person, group, or channel by partial name, @username, public link, or numeric chat ID. It clearly distinguishes this lookup tool from actions like joining channels or global fuzzy search, and from management via /channels.

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?

The description explicitly covers when to use Session versus archive-only search, says to clarify ambiguous matches, recommends using a known chat_id directly, and states that it does not join channels or perform global fuzzy search. It also routes owned-channel management to /channels.

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.

Resources