Skip to main content
Glama
jgalea

telegram-mcp

by jgalea

search_regex

Find messages in Telegram's local cache by matching a regex pattern, with optional chat and time filters for precise results.

Instructions

Search cached messages using a regex pattern (runs locally, not against Telegram API)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoISO datetime — only messages after this time
limitNo
beforeNoISO datetime — only messages before this time
chat_idNoOptional: search only this chat
patternYesPython regex pattern
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose one meaningful behavior: the operation runs locally against the cache and does not call the Telegram API, implying results are bounded by cache freshness and that network calls are avoided. But it does not disclose the return format, whether only message text is matched, result ordering, or that the cache may need syncing first — gaps that matter without annotation backstop.

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?

One sentence, roughly a dozen words, with the verb and resource front-loaded and the decisive local-vs-API distinction in a parenthetical. There is zero filler; every word earns its place.

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?

The description covers the what and where (regex search over local cache), and the sibling set (sync_messages, export_cached_messages, clear_cache) makes the cache concept inferable. However, there is no output schema and no disclosure of what results look like, how fresh the data is, or whether the cache must be populated first, so an agent is left guessing at the tool's contract beyond invocation.

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 80%, so the baseline is 3 even with no parameter info in the description. The description adds nothing about pattern syntax, limit behavior, or datetime handling beyond what the schema already provides, so it stays at the baseline.

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 names a specific verb ('Search'), a specific resource ('cached messages'), and a precise mechanism ('regex pattern'). The parenthetical ('runs locally, not against Telegram API') sharply distinguishes it from API-backed siblings like search_messages and read_messages, so an agent can tell them apart without opening schemas.

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?

Usage context is implied but not explicit: the regex mechanism suggests pattern-based queries and the 'runs locally' clause signals this does not hit the live Telegram API, hinting the agent should prefer API-backed tools when fresh data is needed. However, it never names an alternative (e.g., search_messages) or states a when-not-to-use condition, leaving the routing decision to inference.

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

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