Skip to main content
Glama

Telegram Search Messages

telegram_search_messages
Read-only

Searches your Telegram messages by text, across all chats or (with chat_id from telegram_list_chats) inside one chat. Searches Telegram's servers, so it covers your full history. Requires Telegram connected (telegram_connect).

Input Schema

NameRequiredDescriptionDefault
limitNoMax messages (default 30, max 100).
queryYesText to search for.
accountNoWhich linked Telegram account to use: its label or id from telegram_list_accounts. Leave it out to use the default account.
chat_idNoOptional chat id from telegram_list_chats to search only that chat.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds real value beyond that: it discloses that the search runs against Telegram's servers and therefore covers full history, and that a connection prerequisite (telegram_connect) must be satisfied. It stops short of describing pagination or result ordering.

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 tight sentences with no waste; the core purpose and scope are front-loaded, followed by the coverage guarantee and then the prerequisite. Every sentence earns its place.

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?

With an output schema present, return values need not be described. The description covers purpose, scope modes, coverage guarantee, and the connection prerequisite, so an agent has everything needed to call it correctly.

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 description coverage is 100%, so all four parameters already carry their own descriptions. The description restates the chat_id → telegram_list_chats relationship that the schema already documents, adding no new syntax or format detail. Baseline 3 is appropriate when the schema does the work.

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 and resource ('Searches your Telegram messages by text') and defines both scope modes (across all chats, or one chat via chat_id). It distinguishes itself from telegram_read_messages by virtue of being a text search, and names the related setup tools (telegram_list_chats, telegram_connect).

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?

Provides clear context for when to use it: full-history server-side search, all chats or narrowed by chat_id. However, it never explicitly contrasts itself with the sibling telegram_read_messages for reading recent messages, so the alternative-selection guidance is implied rather than stated.

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