Skip to main content
Glama
draiqw

telegram-mcp

by draiqw

tg_search

Search Telegram messages across all chats or one chat. Filter by attachment type, tag, and date range to locate specific content.

Instructions

Full-text search across all chats, or inside one chat when chat is given.

Args: query: text to look for. May be empty when filtering by kind or tag. chat: restrict to one chat; omit to search everywhere. limit: how many messages to return. kind: attachment filter, same tabs as tg_media ("photo", "file", "music", "voice", "link", ...). Combine with an empty query to list, say, every document someone sent. since: ISO date — stop once messages get older than this. until: ISO date — start from this point back in time. tag: Saved Messages tag (chat="me" only), the same labels shown in Telegram. tg_saved_tags lists them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
chatNo
kindNo
limitNo
queryNo
sinceNo
untilNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explains behavioral details such as since/until direction ('stop once messages get older than this', 'start from this point back in time') and constraints like tag being 'Saved Messages (chat="me" only)'. It doesn't explicitly state read-only, but the search semantics imply it, and no side effects are mentioned.

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 well-structured: a concise summary line followed by an Args block. Every sentence earns its place—no fluff, with examples and cross-references that add value without unnecessary length.

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 the tool has 7 optional parameters, no annotations, and an output schema, the description covers all necessary context: scoping, parameter combinations, related tools, and behavioral nuances. It is complete enough for correct usage without needing external documentation.

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

Parameters5/5

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

The schema has 0% coverage, but the description fully compensates with a detailed Args section explaining all 7 parameters, including examples and edge cases (e.g., 'Combine with an empty query to list, say, every document someone sent'). This goes well beyond the bare schema.

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 'Full-text search across all chats, or inside one chat when `chat` is given'—a specific verb and resource with explicit scope. It distinguishes itself from sibling tools like tg_media and tg_mentions by focusing on full-text search and mentioning filtering options.

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?

It gives practical usage context: how to restrict to one chat, that query may be empty with kind/tag filters, and references tg_media and tg_saved_tags for valid values. While it doesn't explicitly say 'when not to use', the examples and references provide clear guidance on when this tool is appropriate.

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

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