Skip to main content
Glama
LoneVertex

Telegram MCP — Next Generation

Search Messages Within Specific Chat

search_messages
Read-onlyIdempotent

Find past Telegram conversations by searching text keywords within a specific chat or supergroup. Locate relevant messages using chat ID, username, or phone number.

Instructions

Search for text keywords within a specific Telegram chat or supergroup. Use when finding past conversations in a single chat. To search the offline cache without live Telegram API calls, use search_cached_messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of items or records to retrieve (integer between 1 and 100).
queryYesSearch text string or keywords to match against messages, contacts, or entities.
accountNoOptional account label for multi-account environments. If omitted in single-mode, the default account is used. In multi-mode without an account, read-only tools fan out across all configured accounts.
chat_idYesTarget Telegram chat, group, supergroup, channel, or user identifier. Accepts numeric chat ID (e.g. -1001234567890 or 123456789), username (e.g. '@channel'), or phone number.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.1.1

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds the context that this performs live Telegram API calls versus cached search, but does not disclose rate limits, auth requirements, or pagination behavior beyond what schema/annotations provide.

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?

Two efficient sentences with no wasted words. The core purpose is front-loaded, and the alternative tool is named clearly in the second sentence.

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 rich annotations, a full output schema, and complete schema descriptions for all parameters, the description covers everything needed to select and invoke the tool correctly. It clarifies scope, live API behavior, and the cached alternative.

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 schema fully documents chat_id, query, limit, and account. The description aligns with the query and chat_id semantics but does not add meaning beyond the schema, 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 states a specific verb, resource, and scope: 'Search for text keywords within a specific Telegram chat or supergroup.' It is clearly distinguishable from sibling search tools (search_cached_messages, search_contacts, search_public_chats) because it specifies the single-chat scope.

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

Usage Guidelines5/5

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

Explicitly says 'Use when finding past conversations in a single chat' and names the alternative: 'To search the offline cache without live Telegram API calls, use search_cached_messages.' This gives the agent clear routing guidance and an exclusion condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.