Skip to main content
Glama
beautyfree

mcp-telegram

by beautyfree

Search messages in a dialog

search_messages
Read-only

Search messages in any Telegram chat using text, sender, media type, and date filters to quickly locate specific conversations or files.

Instructions

Search messages within one dialog. Supports text substring, type filter (photos/links/etc), sender filter, and date range. Newest first unless reverse=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
peerYesDialog id or @username
limitNo
queryNoSubstring to match in the message text
filterNoMedia/content type filter
maxDateNoUnix seconds — exclude messages newer than this
minDateNoUnix seconds — exclude messages older than this
reverseNoOldest first when true
fromUserNoUsername (@nick) or numeric id of the sender to filter by
accountIdNo
Behavior4/5

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

The description adds behavioral details beyond annotations, such as default sorting (newest first) and the effect of reverse=true, plus supported filter types. The readOnlyHint already communicates safety, so the bar is lower, and this description contributes meaningful extra context.

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 three concise sentences, each with clear value: scope, filters, and ordering. No meaningless words or repetition.

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

Completeness4/5

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

The description covers the core features of the tool adequately for a search operation. It does not mention limit or accountId parameters, but the schema indicates them and the overall description is sufficient for an agent to understand what the tool does and when to use it.

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

Parameters4/5

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

The description summarizes the parameter semantics in plain language (query, filter, sender, date range) and clarifies the default sort behavior. Since the schema already has descriptions for most parameters, the description provides an additional layer of understanding without redundancy.

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 tool searches messages within one dialog, using a specific verb and resource. It distinguishes itself from global search (search_global) and listing tools (list_messages) by explicitly scoping to a single dialog.

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: use for searching within one dialog with filters like text, type, sender, and date range. It does not explicitly name alternatives, but the scope is well-defined and not misleading.

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

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