Skip to main content
Glama
tgsearch-mcp

tgsearch-mcp

by schebotar

tg_find_chats

Find Telegram chats by title, username, or ID across your dialogs and the public directory, returning the exact ref needed for other tools.

Instructions

Find chats and return the exact ref to use in other tools.

Searches your dialogs by title/username/id and, for a non-empty query, the public Telegram directory. Public results include chats you have not joined; nothing is joined automatically.

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": "tg_find_chats"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax chats per source.
queryNoSubstring of the chat title, @username or id (case-insensitive).
scopeNodialogs = your chats, public = Telegram directory, all = both.all
refreshNoBypass the 5-minute dialog cache.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: public results include unjoined chats and 'nothing is joined automatically', which reassures the agent that this lookup has no membership side effects. It says nothing about ordering, result merging between the two sources, rate limits, or auth prerequisites, and the 5-minute cache is only revealed in the schema's `refresh` parameter rather than the description.

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 the key returned value, then the two sources, then the no-auto-join caveat. Four short sentences with no filler, though the paragraph breaks make it slightly longer visually than its content requires.

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?

Four optional parameters, all fully documented in the schema, plus an output schema, so the description needn't explain return values. It covers the multi-source search behavior and the safety caveat; only secondary operational details (cache staleness, result ordering) are left to structured fields.

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?

Schema coverage is 100%, so the baseline is 3; the description still earns a bump by tying `query` to the public-directory behavior ('for a non-empty query, the public Telegram directory'), which explains why an empty query behaves differently from a filled one — information the enum and param descriptions alone do not convey.

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 description uses a specific verb and resource ('Find chats') and adds a differentiating output promise: it returns 'the exact `ref` to use in other tools', which positions it as the resolution step preceding tg_get_chat, tg_get_messages and friends. It stops short of naming or contrasting any sibling explicitly, so it is clear but not fully disambiguated.

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?

'return the exact `ref` to use in other tools' gives the agent a concrete workflow cue about when this tool is the right entry point. The public-directory condition ('for a non-empty query') is also stated. There is no explicit when-not or named alternative, which keeps it below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.