Skip to main content
Glama

Search messages globally

search_messages_globally
Read-onlyIdempotent

Search across all Telegram chats simultaneously using comma-separated terms, with optional filters for date range, chat type, and public username to find relevant messages.

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/leshchenko1979/fast-mcp-telegram/blob/main/docs/Tools-Reference.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch terms, comma-separated for multiple terms (OR-style global search). Required.
limitNoMaximum messages to return (recommended 50 or less).
min_dateNoInclusive minimum date filter (ISO 8601 date or datetime). Omit for no lower bound.
max_dateNoInclusive maximum date filter (ISO 8601 date or datetime). Omit for no upper bound.
chat_typeNoComma-separated chat kinds: private, bot, group, channel. Case-insensitive; extra spaces allowed.
publicNoIf true, prefer chats with a public username; if false, without. Does not apply to private DMs. Omit to skip this filter.
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
errorNo
operationNo
codeNo
paramsNo
exceptionNo
actionNo
error_codeNo
messagesNo
has_moreNo
total_countNo
_warningNo
Behavior4/5

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

Beyond annotations (readOnly, idempotent, openWorld), the description adds that include_total_count is ignored and describes the return structure. No contradictions with 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?

Three sentences, each informative: scope, query+filters, success output and a behavioral note. No fluff, front-loaded.

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 8 parameters, the description covers purpose, scope, query format, filters, return type, and a key idiosyncrasy (include_total_count ignored). References full docs for detail. Output schema exists, so return values are sufficiently handled.

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 baseline 3. The description rephrases parameter usage (comma-separated query, optional filters) but adds no syntax or behavioral details beyond the schema.

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 it searches all Telegram chats globally, not scoped to one chat. It contrasts with per-chat tools like get_messages, establishing a distinct purpose.

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 indicates global search scope and mentions that include_total_count is ignored. It implies use for broad search across chats, but doesn't explicitly list alternatives or exclusions beyond the sibling context.

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/leshchenko1979/fast-mcp-telegram'

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