Skip to main content
Glama
draiqw
by draiqw

tg_media

Read-onlyIdempotent

Find and list media attachments in a Telegram chat by type, returning message IDs, filenames, sizes, MIME types, and durations for direct download via the companion download tool.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, the description discloses that the tool returns metadata rather than file content, supports pagination via before_id, and accepts multiple chat identifier formats. No behavior contradicts the annotations.

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 organized: a one-sentence purpose, a returns-and-follow-up line, then a tight bullet-style Args list. Every sentence adds operational value; nothing is redundant or padded.

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?

For a read-only listing tool with four simple parameters and no output schema, the description covers purpose, return fields, all parameter semantics, and how to continue the workflow with tg_download_many. Nothing needed to select or invoke the tool correctly is missing.

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?

Schema description coverage is 0%, so the description carries the burden, and it fully delivers: chat formats, the complete kind enumeration with the 'media' default, limit's meaning, and before_id's pagination behavior are all explained in the Args section.

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 opens by framing the tool as 'Attachments in a chat, the way Telegram's own media tabs work' and then explicitly says it returns message ids, file names, sizes, mime types, and durations. This clearly identifies the resource (chat attachments) and the operation (list/browse by kind), and it distinguishes the tool from tg_download_many by noting the download tool consumes these ids.

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 gives a concrete workflow: use tg_download_many to fetch files after collecting ids from tg_media. It also sets the selection context by scoping the tool to media-tab-style browsing across kind categories, though it does not explicitly contrast it with tg_history or tg_search.

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