Skip to main content
Glama
Anonymouse8882

Telegram MCP

search_messages

Search messages across all chats or within a specific chat. Filter by keywords, sender, and media type to pinpoint the messages you need.

Instructions

搜索消息。不传 chat 时进行全局搜索(搜索所有对话)。

Args: query: 关键词;配合 media_type 时可以留空字符串只按类型筛。 chat: 限定某个对话;留空为全局搜索。 limit: 条数上限,最多 200。 from_user: 限定发送者(仅在指定 chat 时有效)。 media_type: 只搜某种媒体类型的消息。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNo
limitNo
queryYes
from_userNo
media_typeNoany

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description adds value by explaining parameter behavior: query can be empty with media_type, limit maximum is 200, and from_user is only valid with chat. It does not cover auth or rate limits but these are less critical for a read-only search.

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?

The description is structured with an Args list and is fairly concise. It could be slightly more compact but every sentence adds value.

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?

Given 5 parameters and an output schema, the description covers all parameters and usage nuances. It explains defaults and constraints, making it complete for a search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description compensates fully. It explains each parameter: query (keyword), chat (scope), limit (max 200, default 30), from_user (conditional on chat), and media_type (enum). It also clarifies that query can be empty when using media_type.

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 'search messages' and explains the scope: global search when chat is omitted vs within a specific chat. This distinguishes it from sibling tools like get_messages and get_media_messages.

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 provides clear usage context: when to search globally vs within a chat, and constraints like from_user only works when chat is specified. However, it does not explicitly mention when not to use it or alternatives.

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/Anonymouse8882/TelegamMCP'

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