Skip to main content
Glama
draiqw

telegram-mcp

by draiqw

tg_media

List media attachments in a chat by kind, returning message IDs, file names, sizes, and durations. Paginate older items using before_id.

Instructions

Attachments in a chat, the way Telegram's own media tabs work.

Returns message ids, file names, sizes, mime types and durations — feed those ids to tg_download_many to actually fetch the files.

Args: chat: chat id, @username, exact title, or "me". kind: media (photos+videos), photo, video, file, music, voice, round, gif, link, pinned, geo, contact. limit: how many items. before_id: paginate to items older than this message id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatYes
kindNomedia
limitNo
before_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are present, so the description carries the full behavioral disclosure burden. It transparently states return fields, supported media kinds, and pagination via before_id, and implies a read-only operation by directing downloads to another tool. It could mention authentication requirements or error scenarios, but the behavior is clear enough for an agent to use safely.

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 compact and well-structured, with an opening analogy, a return-value summary, and a clean Args block. Every sentence adds value without redundancy, and the structure makes it easy to scan. It is appropriately sized for the tool's complexity.

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's moderate complexity (four parameters, output schema present), the description is remarkably complete. It covers purpose, all parameter semantics, return fields, pagination, and the next-step download workflow. The absence of error-handling notes is acceptable for a listing tool, and the description provides all necessary context for correct invocation.

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 input schema has zero descriptions for its parameters, so the description fully compensates. Each parameter is explained meaningfully: chat includes id/username/title/me, kind lists all allowed categories, limit defines item count, and before_id clarifies pagination semantics. This is exemplary parameter documentation.

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 identifies the tool as listing attachment metadata for a chat, using the intuitive analogy of Telegram's media tabs. It specifies return fields and explicitly points to tg_download_many for file retrieval, distinguishing it from download-related siblings. The purpose is unambiguous and specific.

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 by explaining that metadata is returned and that tg_download_many should be used to actually fetch files. This gives a practical workflow and differentiates from download tools. However, it does not explicitly contrast with other listing/search tools like tg_history or tg_search, so it lacks explicit exclusions.

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