Skip to main content
Glama
egor-fedorov

Telegram Context MCP

by egor-fedorov

download_attachment

Downloads one selected Telegram attachment (ID from get_messages or get_album) up to 20 MiB, returning a local file path and ResourceLink instead of inline bytes.

Instructions

Download one explicitly selected attachments[].id, up to 20 MiB.

    Requires allow_attachment_downloads and ordinary source-read permission. Use
    get_messages or get_album to select an attachment first. The ID selects the current
    attachment at that message, not an archived version. Protected and expiring media
    cannot be downloaded. Returns a local path and a ResourceLink, without inline bytes;
    use resources/read before expires_at to retrieve binary content. Files expire after
    15 minutes or server shutdown. The local path is on the server computer. Temporary
    failures require retrying this call; respect retry_after_seconds. No partial resume.
    save=true retains a permanent copy when archive_directory is configured.
    

Input Schema

NameRequiredDescriptionDefault
saveNo
attachment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A5/5.0
Behavior5/5

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

The description adds extensive behavior beyond annotations: returns a local path and ResourceLink without inline bytes, requires resources/read before expires_at, expires after 15 minutes or server shutdown, the path is on the server, and temporary failures require retrying with retry_after_seconds. It also clarifies no partial resume and current-vs-archived attachment semantics.

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 front-loads the core action and scope, then groups prerequisites, return behavior, expiry, retry behavior, and save semantics. Although multi-sentence, every sentence adds operational value for a tool with nontrivial download and expiry behavior.

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?

There is no output schema, so the description appropriately explains the return shape: local path and ResourceLink, no inline bytes, and use resources/read before expiry. It also covers permissions, exclusions, expiry, retry behavior, and save semantics, which is complete for this tool.

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 must carry parameter meaning. It explains attachment_id as an explicitly selected attachments[].id that selects the current attachment rather than an archived version, and it explains save=true as retaining a permanent copy when archive_directory is configured.

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 states a specific verb and resource: downloading one explicitly selected attachment by attachments[].id, with a clear 20 MiB scope. It distinguishes the operation from selecting messages/albums and from interpreting attachment content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states prerequisites (allow_attachment_downloads and ordinary source-read permission), how to select an attachment first via get_messages or get_album, and exclusions for protected and expiring media. It also explains save=true retention behavior.

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