Skip to main content
Glama
alexeyleshchenko

Telegram MCP Server

Search messages globally

search_messages_globally
Read-onlyIdempotent

Search across all Telegram chats simultaneously for messages matching comma-separated query terms. Apply optional filters by date, chat kind, or public username for targeted results.

Instructions

Search all Telegram chats at once (not scoped to one chat). Comma-separated query terms; optional filters by date, chat kind, and public username. Success: message list and metadata dict. Global search ignores include_total_count. Full documentation: https://github.com/alexeyleshchenko/fast-mcp-telegram/blob/main/docs/Tools-Reference.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum messages to return (recommended 50 or less).
queryYesSearch terms, comma-separated for multiple terms (OR-style global search). Required.
publicNoIf true, prefer chats with a public username; if false, without. Does not apply to private DMs. Omit to skip this filter.
max_dateNoInclusive maximum date filter (ISO 8601 date or datetime). Omit for no upper bound.
min_dateNoInclusive minimum date filter (ISO 8601 date or datetime). Omit for no lower bound.
chat_typeNoComma-separated chat kinds: private, bot, group, channel. Case-insensitive; extra spaces allowed.
auto_expand_batchesNoExtra search batches to run when filters narrow results. Higher values may return more matches at the cost of latency.
include_total_countNoIf true, response may include total_count where supported (per-chat search; ignored for global search).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
codeNo
errorNo
actionNo
paramsNo
_warningNo
has_moreNo
messagesNo
exceptionNo
operationNo
error_codeNo
total_countNo
Behavior4/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description discloses meaningful behavioral nuances: 'Global search ignores include_total_count' and 'Success: message list and metadata dict' describes return structure. These details inform the agent about parameter behavior and expected output, adding value over the annotations.

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

Conciseness5/5

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

The description is compact and efficient, front-loading the core purpose and scope, then covering query format, filters, output, and a behavioral note in just four short sentences. Every sentence conveys useful information without redundant fluff, earning a 5.

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?

For a tool with 8 parameters and a rich schema, the description effectively complements the structured data by clarifying global scope, output shape, and a key behavioral caveat. It doesn't need to explain every parameter because the schema does. The documentation link adds an escape hatch for deeper context.

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?

The input schema already provides 100% coverage with detailed parameter descriptions, so the baseline is 3. The description adds no new parameter semantics beyond what the schema says, though it does restate query format ('Comma-separated query terms') and mentions include_total_count being ignored, which the schema also covers. This is sufficient but not additive.

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 description clearly states the tool's core function: 'Search all Telegram chats at once' with explicit scope distinction ('not scoped to one chat'). This unambiguously differentiates it from per-chat search tools like get_messages, making the purpose immediately obvious.

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?

The description gives clear context that this is for global cross-chat searching, contrasted with per-chat scope. It doesn't explicitly name sibling tools as alternatives, but the 'not scoped to one chat' phrasing strongly implies when to use it. The documentation link provides further guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alexeyleshchenko/fast-mcp-telegram'

If you have feedback or need assistance with the MCP directory API, please join our Discord server