Skip to main content
Glama
kamalbuilds

Telegram MCP Server

by kamalbuilds

search_messages

Search for messages across all Telegram chats or within a specific chat using a query and optional chat filter.

Instructions

Search for messages across all Telegram chats or within a specific chat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNoOptional: limit search to this chat ID or @username
limitNoMax results (default 20)
queryYesSearch query
Behavior3/5

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

With no annotations provided, the description must carry the behavioral burden. The description states the search scope (all chats or specific) and implies it is a read operation (search), but does not disclose details like whether it returns only text messages, if media is excluded, whether deleted chats are included, or rate limits. It is adequate but lacks depth for a search tool.

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 a single concise sentence that states the tool's purpose and scope. It is front-loaded and efficiently uses words, but could be slightly more precise (e.g., specifying that search is by text content). No wasted words, but the brevity leaves some ambiguity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters (all with schema descriptions), no output schema, and no annotations, the description provides the core purpose but fails to guide on expected output, pagination behavior, or edge cases (e.g., empty results). It is complete enough for a basic search tool but leaves gaps for an agent to infer.

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 the baseline is 3. The description does not add any parameter semantics beyond what the schema already provides (e.g., no clarification on query syntax, whether chat is case-sensitive, or how limit interacts with pagination). It meets the baseline but does not exceed it.

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 clearly states the tool searches for messages across all Telegram chats or within a specific chat. The verb 'Search' and resource 'messages' are specific, and the scope (all chats vs. specific chat) is mentioned, which helps differentiate from siblings like read_messages which likely retrieves messages by other criteria. However, it does not explicitly contrast with sibling tools, so a perfect 5 is not warranted.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool (to search messages) but provides no explicit guidance on when not to use it or alternatives. Given sibling tools like read_messages and list_chats, there is no mention of how search_messages differs (e.g., keyword matching vs. retrieving recent messages). The usage context is implied but not elaborated.

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/kamalbuilds/telegram-mcp-server'

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