Skip to main content
Glama
OrrBin

Telegram MCP Server

by OrrBin

search_messages

Search all chats or a specific chat for messages matching a query. Optionally set a chat ID to narrow results and a limit to control the number returned.

Instructions

Search for messages across all chats or within a specific chat

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results to return (default: 20, max: 100)
queryYesSearch query to find messages
chatIdNoLimit search to specific chat (optional)
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as matching rules (exact/fuzzy), case sensitivity, result ordering, or pagination. It only restates the tool's purpose and scope, leaving the agent without details that would be useful 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.

Conciseness5/5

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

The description is a single sentence, front-loaded with the action and scope, and contains no unnecessary words. It is highly concise and efficiently conveys the tool's core functionality.

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?

For a simple search tool with 100% schema coverage, the description is minimally viable. However, the lack of an output schema and any behavioral notes means the agent cannot fully anticipate return format or edge cases, making it slightly incomplete.

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 provides descriptions for all three parameters (query, chatId, limit) with 100% coverage. The tool description adds no additional parameter semantics, so the baseline of 3 is appropriate.

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 action 'Search for messages' with a specific resource and scope ('across all chats or within a specific chat'). It distinguishes from sibling tools like search_chats, which search for chats rather than 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 context on when to use the tool: to search messages either globally or scoped to a chat. However, it does not explicitly name alternatives or state when not to use this tool, though sibling tool names suggest the alternative.

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

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