Skip to main content
Glama
Telegram MCP

Telegram MCP

by aminkh17

Search messages

search_messages
Read-only

Find messages by text within one allowlisted Telegram chat or across all allowlisted chats, with results returned newest first.

Instructions

Search messages by text inside one allowlisted chat, or across all allowlisted chats. Results are newest first.

Input Schema

NameRequiredDescriptionDefault
chatNoOptional allowlisted chat to search. Omit to search every allowlisted chat.
limitNoMaximum number of results (default from config).
queryYesText to search for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuinely new behavior: the allowlist restriction and result ordering ("newest first"). It does not address pagination behavior, matching semantics (substring vs token), or whether results are ranked vs purely chronological beyond the ordering note.

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 short sentences with zero waste: scope first, ordering second. Nothing is padded and nothing needs to be read twice.

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?

For a three-parameter read-only search with full schema coverage and no output schema, the definition covers scope and ordering adequately. A brief note on result fields or matching behavior would close the remaining gap.

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%, with chat, limit, and query all documented in-schema, so baseline is 3. The description restates the chat-omission rule already present in the schema and adds nothing about query matching or limit interaction.

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?

Names a specific verb and resource ("Search messages by text") and states the scope precisely: one allowlisted chat or all allowlisted chats. That scope distinction is what separates it from get_messages, but the description never names or contrasts with that sibling, leaving the agent to infer the difference.

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?

Gives usable context (omit chat to search everything) which tells the agent how to broaden scope, but offers no explicit when-to-use versus get_messages or get_message, and no exclusions or prerequisites besides the implicit allowlist constraint.

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